GNOME Bugzilla – Bug 736061
typefind: detects AAC instead of mpegts when input buffer is small
Last modified: 2014-12-30 12:30:54 UTC
gst-play-1.0 http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8 After some time leads to: Now playing http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8 Prerolling... 0:00:09.8 / 0:30:00.0 0:00:29.6 / 0:30:00.0 0:00:37.794058437 15049 0x7f06e8002590 ERROR libav :0:: Number of bands (16) exceeds limit (14). 0:00:37.801573325 15049 0x7f06e8002590 ERROR libav :0:: Error decoding AAC frame header. 0:00:37.802829096 15049 0x7f06e8002590 ERROR libav :0:: Error decoding AAC frame header. 0:00:37.804724439 15049 0x7f06e8002590 ERROR libav :0:: Error decoding AAC frame header. ** (gst-play-1.0:15049): CRITICAL **: gst_audio_channel_positions_to_valid_order: assertion 'channels > 0' failed ** (gst-play-1.0:15049): CRITICAL **: gst_audio_decoder_set_output_format: assertion 'GST_AUDIO_INFO_IS_VALID (info)' failed 0:00:37.806126341 15049 0x7f06e8002590 ERROR libav :0:: get_buffer() failed ERROR GStreamer error: negotiation problem. for http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8 ERROR debug information: gstavauddec.c(446): gst_ffmpegauddec_negotiate (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/avdec_aac:avdec_aac2: Could not set caps for libav decoder (aac), not fixed?
Does not happen always, just sometimes
Did you particularly notice from which 'gear' it switches from/to? Could be related to one particular switch.
The issue seems to begin with aacparse. It somehow loses sync and then starts parsing ADTS headers that looks to be random data and ends up with generating a few different caps in a row. One of those ends up having channels=0.
This is actually a typefinding issue. The file http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear1/fileSequence2.ts is typefound as AAC when the input buffer has a size smaller than 1508 bytes, it is correctly typefound as mpegts above this value.
commit 104bd7cf02bad9e83b440b48e57ea6483c5ca3ef Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Tue Dec 30 08:07:18 2014 -0300 hlsdemux: only typefind when we have a minimum amount of data For small amounts some data might be mistyped and it would cause the pipeline to fail. For example if you have AAC inside mpegts, for small amounts, the AAC samples would cause the typefinder to think it is AAC and not mpegts. https://bugzilla.gnome.org/show_bug.cgi?id=736061