[gstreamer-bugs] [Bug 480557] Nasty segfault in CVS HEAD

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Nov 14 08:14:50 PST 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=480557

  GStreamer | don't know | Ver: HEAD CVS




------- Comment #10 from Edgard Lima  2007-11-14 16:14 UTC -------

Ok, the commit I pointed out above was really ugly.

Lets have a look at the real bug we are facing (which is a bug in device driver
side):

gst_v4l2src_grab_frame {
...
while (ioctl (v4l2src->v4l2object->video_fd, VIDIOC_DQBUF, &buffer) < 0)

It should never return true unless really there is a buffer available

What happens to my device driver (pwc: Logitech QuickCam Orbit/Sphere USB
webcam) is that when this function is called on third time, we have the
following situation:
buffer[0] is in use upstream
buffer[1] is free ('cause for this buffer, the last one, we always copied)

then the 'ioctl' above returns 0 with buffer.index = 0. which should be
impossible  'cause the buffer[0] has not been finalized yet (so not available
for the driver to write in it yet - means VIDIOC_QBUF not called yet for this
buffer)

So, we have two options

1- doesn't change anything (just rollback my last ugly commit) and report or
send a patch to the device driver guys
2- make always copy for the time being

(I vote 1)

btw: Wim what do you think of make the default buffer pool size 4 instead
current 2?


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=480557.




More information about the Gstreamer-bugs mailing list