GNOME Bugzilla – Bug 609478
[faad] SIGSEGV when caps contains codec_data=(buffer)NULL
Last modified: 2010-02-16 16:58:09 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.
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
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.
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.
Chances are the first 1M of the file will already do, no?
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
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.