GNOME Bugzilla – Bug 684430
v4l2src crashes when getting latency query before having configured the bufferpool
Last modified: 2012-09-20 12:52:06 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
+ Trace 230878
Created attachment 224812 [details] [review] handle latency queries when the bufferpool isn't setup yet
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).
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