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 609478 - [faad] SIGSEGV when caps contains codec_data=(buffer)NULL
[faad] SIGSEGV when caps contains codec_data=(buffer)NULL
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal normal
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-10 00:39 UTC by Rob Clark
Modified: 2010-02-16 16:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to change the logic slightly to handle the case where the value exists in the structure, but it's value is NULL (1.81 KB, patch)
2010-02-10 00:43 UTC, Rob Clark
none Details | Review

Description Rob Clark 2010-02-10 00:39:46 UTC
With some video files I have, qtdemux seems to give gstfaad caps containing "codec_data=(buffer)NULL".  In which case, gstfaad will segfault.  This is fixed by the attached patch.
Comment 1 Rob Clark 2010-02-10 00:43:15 UTC
Created attachment 153377 [details] [review]
patch to change the logic slightly to handle the case where the value exists in the structure, but it's value is NULL
Comment 2 Tim-Philipp Müller 2010-02-10 01:01:26 UTC
Could you point us to a file that triggers this by any chance?

The patch is of course not wrong, but it looks like it's just a workaround for a bug in qtdemux: putting NULL buffers into caps is just broken and shouldn't happen.
Comment 3 Rob Clark 2010-02-10 01:05:05 UTC
I'm not sure if I could send the whole file, unfortunately..  let me ask if maybe I could send the first part of the file, which might help.

Or, if you think this is invalid behavior on the part of qtmux, then I could have a look at that (maybe sometime next week) and send a patch for that too.
Comment 4 Tim-Philipp Müller 2010-02-16 11:23:37 UTC
Chances are the first 1M of the file will already do, no?
Comment 5 Rob Clark 2010-02-16 15:05:06 UTC
I went back and checked the original file, w/ qtdemux into fakesink..  actually the caps coming out of qtmux are fine, the problem was another element in the pipeline that we had to extract AAC stream type (LC, HE, HE-PS) for the codec..

so qtdemux is fine
Comment 6 Tim-Philipp Müller 2010-02-16 16:57:51 UTC
Ok, so I've committed this now:

 commit 26e7e93bfddb120aff99bcb6628f60962de02c1c
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Tue Feb 16 16:49:39 2010 +0000

    faad: guard against codec_data field with a NULL buffer in caps
    
    Fixes #609478.

which seems the most appropriate fix to me.

It's a grave programming error in some third element, there are limits what we should be doing to guard against that IMHO.