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 736061 - typefind: detects AAC instead of mpegts when input buffer is small
typefind: detects AAC instead of mpegts when input buffer is small
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-04 15:01 UTC by Sebastian Dröge (slomo)
Modified: 2014-12-30 12:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2014-09-04 15:01:27 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?
Comment 1 Sebastian Dröge (slomo) 2014-09-04 15:02:50 UTC
Does not happen always, just sometimes
Comment 2 Thiago Sousa Santos 2014-11-23 19:41:30 UTC
Did you particularly notice from which 'gear' it switches from/to? Could be related to one particular switch.
Comment 3 Thiago Sousa Santos 2014-11-24 05:34:01 UTC
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.
Comment 4 Thiago Sousa Santos 2014-12-29 20:55:45 UTC
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.
Comment 5 Thiago Sousa Santos 2014-12-30 12:30:54 UTC
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