After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684430 - v4l2src crashes when getting latency query before having configured the bufferpool
v4l2src crashes when getting latency query before having configured the buffe...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 674179
 
 
Reported: 2012-09-20 07:56 UTC by Sjoerd Simons
Modified: 2012-09-20 12:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
handle latency queries when the bufferpool isn't setup yet (1.20 KB, patch)
2012-09-20 08:08 UTC, Sjoerd Simons
committed Details | Review

Description Sjoerd Simons 2012-09-20 07:56:35 UTC
(gdb)  p *obj
$12 = {element = 0x7c4020, type = V4L2_BUF_TYPE_VIDEO_CAPTURE, videodev = 0x7c2210 "/dev/video0", video_fd = 33, mode = GST_V4L2_IO_MMAP, poll = 0x179dc00, can_poll_device = 1, 
  active = 0, streaming = 0, fmtdesc = 0x193ac50, info = {finfo = 0x7ffff7505ae8, interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE, flags = GST_VIDEO_FLAG_NONE, width = 320, 
    height = 240, size = 115200, views = 1, chroma_site = GST_VIDEO_CHROMA_SITE_UNKNOWN, colorimetry = {range = GST_VIDEO_COLOR_RANGE_16_235, matrix = GST_VIDEO_COLOR_MATRIX_BT601, 
      transfer = GST_VIDEO_TRANSFER_BT709, primaries = GST_VIDEO_COLOR_PRIMARIES_BT470M}, par_n = 1, par_d = 1, fps_n = 15, fps_d = 1, offset = {0, 76800, 96000, 0}, stride = {320, 
      160, 160, 32767}, _gst_reserved = {0x7ffff707d1a5, 0x7ffff6d90c40, 0x7ffff7079520, 0x500000000}}, bytesperline = 320, sizeimage = 115200, duration = 66666666, 
  req_mode = GST_V4L2_IO_AUTO, pool = 0x0, vcap = {driver = "uvcvideo\000\000\000\000\000\000\000", card = "Integrated Camera", '\000' <repeats 14 times>, 
    bus_info = "usb-0000:00:1a.0-1.6", '\000' <repeats 11 times>, version = 197890, capabilities = 83886081, reserved = {0, 0, 0, 0}}, vwin = {w = {left = 0, top = 0, width = 0, 
      height = 0}, field = V4L2_FIELD_ANY, chromakey = 0, clips = 0x0, clipcount = 0, bitmap = 0x0, global_alpha = 0 '\000'}, vinput = {index = 0, name = '\000' <repeats 31 times>, 
    type = 0, audioset = 0, tuner = 0, std = 0, status = 0, capabilities = 0, reserved = {0, 0, 0}}, formats = 0x183b590, colors = 0x182a040, norms = 0x0, channels = 0x18197a0, 
  tv_norm = 0, channel = 0x193f7d0 "Camera 1", frequency = 0, xv = 0x0, xwindow_id = 0, get_in_out_func = 0x7fffda0e9c30 <gst_v4l2_get_input>, 
  set_in_out_func = 0x7fffda0e9e60 <gst_v4l2_set_input>, update_fps_func = 0}


(gdb) p obj->pool
$2 = (GstBufferPool *) 0x0

(gdb) bt full
  • #0 gst_v4l2src_query
    at gstv4l2src.c line 650
  • #1 gst_pad_query
    at gstpad.c line 3403
  • #2 gst_pad_peer_query
    at gstpad.c line 3534
  • #3 gst_base_transform_default_query
    at gstbasetransform.c line 1488
  • #4 gst_video_rate_query
    at gstvideorate.c line 860

Comment 1 Sjoerd Simons 2012-09-20 08:08:54 UTC
Created attachment 224812 [details] [review]
handle latency queries when the bufferpool isn't setup yet
Comment 2 Tim-Philipp Müller 2012-09-20 11:02:18 UTC
Looks good to me, certainly beats crashing. I'd say push it, and then we can do something more clever later if needed (though I'm not sure what that would be).
Comment 3 Tim-Philipp Müller 2012-09-20 12:51:52 UTC
commit 5d1ed548142aacd1ec6d6d1895585b0a3d1ed662
Author: Sjoerd Simons <sjoerd@luon.net>
Date:   Thu Sep 20 10:07:24 2012 +0200

    v4l2src: handle latency query before setting up the bufferpool
    
    Fixes crash if no bufferpool is set up yet.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684430