GNOME Bugzilla – Bug 659687
avimux FPE crash
Last modified: 2013-11-13 17:19:56 UTC
I am developing a video rendering app, on Ubuntu 10.10, using gstreamer-0.10 and gstreamer-plugins-good-0.10.30. My pipeline is: multijpegsrc -> ffdec_mjpeg -> ffmpegcolorspace -> videoflip -> textoverlay -> textoverlay -> textoverlay -> tee(src) -> ffenc_mp4 -> (video_0)avimux -> filesink, tee(src1) -> queue -> xvimagesink; filesrc -> wavparse -> audioconvert -> ffenc_mp2 -> (audio_0)avimux. Where multijpegsrc is an adapted version of multifilesrc, which uses another file-choosing algorithm corresponding to my needs, but overall effect of working element is the same. An FPE occures only when rendering seem to reach the end (100% progress). Disabling sound fixes FPE, adding zero-division-preventing condition to avimux's code also does. some GDB stuff: Program terminated with signal 8, Arithmetic exception.
+ Trace 228519
Created attachment 197142 [details] [review] avimux: reject some sanity check failing audio caps Attached patch is avoid later division-by-zero by rejecting caps leading to some unexpected field values. However, afaics from current code, that field should not end up 0 with some mpeg caps, so it also leads to wondering what (else) is going on here (in particular with caps ?, and some debug logging should help with that)
Just guessing but currently the muxer would accept "audio/mpeg" without any mpegversion field or anything for example because of the incomplete caps compatibility check in pads (subset vs. non-empty intersection). Patch looks good as a last resort though
It would not accept that easily; there are checks at least requiring channels and rate fields, and also the format fourcc should end up with something valid (which is also unlikely without mpegversion field).
(In reply to comment #2) > Just guessing but currently the muxer would accept "audio/mpeg" without any > mpegversion field or anything for example because of the incomplete caps > compatibility check in pads (subset vs. non-empty intersection). Patch looks > good as a last resort though Can this still happen in 1.0, or can we close this as OBSOLETE now? Can't reproduce this with audiotestsrc ! avenc_mp2 ! avimux ! fakesink.
I have never been clear on how this could happen, also now. So would move to OBSOLETE (and actually do so). If some more information can be provided, particularly some way to reproduce, feel free to reopen.