GNOME Bugzilla – Bug 707016
Regression - Malformed Ogg/FLAC file (containing only Ogg header) hangs decoding
Last modified: 2013-10-07 20:47:50 UTC
It is probably somehow related to Bug 707015. I've created a malformed Ogg/FLAC file using method mentioned in Bug 707015. When I try to play it in 1.0 it hangs the pipeline instead of throwing EOS/Error/whatever. It is very nasty as it can lead to hanging the app as proper callbacks/messages are never called. Test in 1.0: $ LC_ALL=C gst-launch-1.0 -v filesrc location=sine-440hz-0point8-1sec-q5-ogg.flac ! decodebin ! audioconvert ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = audio/ogg /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = audio/ogg /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOggDemux:oggdemux0.GstPad:sink: caps = audio/ogg /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-buffers = 5 /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-time = 0 /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-bytes = 2097152 /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstPad:sink_0: caps = audio/x-flac, rate=(int)44100, channels=(int)1, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstPad:sink_0: caps = audio/x-flac, rate=(int)44100, channels=(int)1, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-buffers = 5 /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-time = 0 /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-bytes = 2097152 /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0.GstPad:src: caps = audio/x-flac, channels=(int)1, framed=(boolean)true, rate=(int)44100, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacDec:flacdec0.GstPad:sink: caps = audio/x-flac, channels=(int)1, framed=(boolean)true, rate=(int)44100, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > Then in hangs until I press Ctrl+C. The same in 0.10 works OK: $ LC_ALL=C gst-launch-0.10 -v filesrc location=sine-440hz-0point8-1sec-q5-ogg.flac ! decodebin ! audioconvert ! fakesink Setting pipeline to PAUSED ... /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = application/ogg Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOggDemux:oggdemux0.GstPad:sink: caps = application/ogg /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOggDemux:oggdemux0.GstOggPad:serial_780c58f2: caps = audio/x-flac, rate=(int)44100, channels=(int)1, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink: caps = audio/x-flac, rate=(int)44100, channels=(int)1, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src: caps = audio/x-flac, rate=(int)44100, channels=(int)1, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0.GstPad:sink: caps = audio/x-flac, rate=(int)44100, channels=(int)1, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0.GstPad:src: caps = audio/x-flac, channels=(int)1, framed=(boolean)true, rate=(int)44100, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacDec:flacdec0.GstPad:sink: caps = audio/x-flac, channels=(int)1, framed=(boolean)true, rate=(int)44100, streamheader=(buffer)< 7f464c414301000003664c614300000022120012000000000000000ac440f00000000000000000000000000000000000000000, 04000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000, 83000000 > Pipeline is PREROLLED ... Setting pipeline to PLAYING ... /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event ******* (fakesink0:sink) E (type: 86, ) 0xb630c090" New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 303600 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacDec:flacdec0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0.GstPad:src: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOggDemux:oggdemux0.GstOggPad:serial_780c58f2: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOggDemux:oggdemux0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL Setting pipeline to NULL ... Freeing pipeline ...
Created attachment 253448 [details] Test file
I have observed the same behaviour with test files from Bug 681368 that was marked as fixed in 1.0.6. $ gst-launch-1.0 -v filesrc location=definitely-not-an-mp3.csv ! decodebin ! audioconvert ! fakesink Ustawianie potoku na PAUZOWANIE... Potok jest PRZEWIJANY... /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, layer=(int)1, parsed=(boolean)false /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, layer=(int)1, parsed=(boolean)false /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMpegAudioParse:mpegaudioparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, layer=(int)1, parsed=(boolean)false /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMpegAudioParse:mpegaudioparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)1, rate=(int)48000, channels=(int)2, parsed=(boolean)true /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)1, rate=(int)48000, channels=(int)2, parsed=(boolean)true
Works in 1.1.4, fails in 1.0.10 too.
I checked with oggdemux, audiodecoder, flacparse and flacdec from git master. Changes in there are not what fixed it. If someone is interested in this, git bisect should be able to find the fix.
I don't think it is related to Ogg/FLAC as I was able to reproduce this with CSV file from bug Bug 681368. I've titled bug report like this because it is the test case I have.
Yes it's the same problem. A file without valid frames does not cause an error, nor does it make sure to get EOS to the sink.
With 1.2.0 being released now let's close this.
IMHO it would be useful to add regression test for such case, wouldn't it?