[MPlayer-users] Crash with -ao jack when channel layout changes in a broadcast aac/latm stream when resample needed.

Andy Furniss adf.lists at gmail.com
Wed Dec 11 13:27:22 CET 2013


I once reported an alsa issue when the channels change with aac/latm in
a TV transport stream here -

http://lists.mplayerhq.hu/pipermail/mplayer-users/2013-March/086026.html

The link to the sample is still working.

With alsa on my stereo setup, sound is still lost by default unless I
create my own mixdown surround51 in $HOME/.asoundrc - I assume those
using a multichannel card/chip will work but only hear L and R.

For this stream if I am using jack and it is running at 48k it looks
good - I don't loose sound and the re-init mentions -

Building audio filter chain for 48000Hz/6ch/floatle ->
48000Hz/2ch/floatle...

So I assume I get mixdown.

However, if I am using jack running at 44.1k (set up for my stereo only
soundcard) and the channel layout changes I get a crash - gdb below.

ph4[mplayer]$ gdb ./mplayer
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/andy/Src/Mplayer-svn/mplayer/mplayer...done.
(gdb) run -v -ao jack ~/2chto51.latm
Starting program: /home/andy/Src/Mplayer-svn/mplayer/mplayer -v -ao jack 
~/2chto51.latm
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
warning: File "/usr/lib/libstdc++.so.6.0.16-gdb.py" auto-loading has 
been declined by your `auto-load safe-path' set to 
"$debugdir:$datadir/auto-load".
MPlayer SVN-r36541-4.6.3 (C) 2000-2013 MPlayer Team
CPU vendor name: AuthenticAMD  max cpuid level: 5
CPU: AMD Phenom(tm) II X4 965 Processor (Family: 16, Model: 4, Stepping: 3)
extended cpuid-level: 27
extended cache-info: 33587520
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNowExt: 1 SSE: 1 SSE2: 1 SSE3: 1 
SSSE3: 0 SSE4: 0 SSE4.2: 0 AVX: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowExt SSE SSE2 
SSE3 CMOV
get_path('codecs.conf') -> '/home/andy/.mplayer/codecs.conf'
Reading optional codecs config file /home/andy/.mplayer/codecs.conf: No 
such file or directory
Reading optional codecs config file /usr/etc/mplayer/codecs.conf: No 
such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/andy/.mplayer/fonts'
Configuration: --prefix=/usr --enable-xvmc --enable-debug
CommandLine: '-v' '-ao' 'jack' '/home/andy/2chto51.latm'
Using nanosleep() timing
get_path('input.conf') -> '/home/andy/.mplayer/input.conf'
Reading optional input config file /home/andy/.mplayer/input.conf: No 
such file or directory
Reading optional input config file /usr/etc/mplayer/input.conf: No such 
file or directory
Falling back on default (hardcoded) input config
get_path('2chto51.latm.conf') -> '/home/andy/.mplayer/2chto51.latm.conf'

Playing /home/andy/2chto51.latm.
get_path('sub/') -> '/home/andy/.mplayer/sub/'
[file] File size is 198044 bytes
STREAM: [file] /home/andy/2chto51.latm
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
libavformat version 55.22.100 (internal)
Configuration: --enable-gpl --enable-postproc
LAVF_check: LOAS AudioSyncStream
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename /home/andy/2chto51.latm ext: .latm
Checking for Nullsoft Streaming Video
Checking for MOV
Checking for VIVO
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 68317, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=22241 size=1150981
LMLM4 Stream Format not found
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 0  p101: 0 p1B6: 0 p12x: 0 sli: 0 a: 0 b: 0 c: 
0 idr: 0 sps: 0 pps: 1 PES: 3  MP3: 363, synced: 0
Not MPEG System Stream format... (maybe Transport Stream?)
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 0  p101: 0 p1B6: 0 p12x: 0 sli: 0 a: 0 b: 0 c: 
0 idr: 0 sps: 0 pps: 1 PES: 3  MP3: 363, synced: 0
Not MPEG System Stream format... (maybe Transport Stream?)
==> Found video stream: 0
ds_fill_buffer: EOF reached (stream: video)
LAVF_check: LOAS AudioSyncStream
libavformat file format detected.
[loas @ 0x555556375ba0]Before avformat_find_stream_info() pos: 0 bytes 
read:32768 seeks:0
[aac_latm @ 0x555556383d60]initializing latmctx
[loas @ 0x555556375ba0]max_analyze_duration 5000000 reached at 5013333 
microseconds
[loas @ 0x555556375ba0]After avformat_find_stream_info() pos: 157696 
bytes read:163840 seeks:0 frames:237
==> Found audio stream: 0
======= WAVE Format =======
Format Tag: 20557 (0x504D)
Channels: 2
Samplerate: 48000
avg byte/sec: 0
Block align: 1
bits/sample: 0
cbSize: 2
Unknown extra header dump: [11] [90]
==========================================================================
[lavf] stream 0: audio (aac_latm), -aid 0
LAVF: 1 audio and 0 video streams found
LAVF: build 3610212
Load subtitles in /home/andy/
get_path('sub/') -> '/home/andy/.mplayer/sub/'
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
libavcodec version 55.45.100 (internal)
Configuration: --enable-gpl --enable-postproc
INFO: libavcodec "aac_latm" init OK!
AUDIO: 48000 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->384000)
Selected audio codec: [fflatm] afm: ffmpeg (FFmpeg AAC in LATM)
==========================================================================
Building audio filter chain for 48000Hz/2ch/floatle -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[dummy] Was reinitialized: 48000Hz/2ch/floatle
Trying preferred audio driver 'jack', options '[none]'
[New Thread 0x7ffff7fc5700 (LWP 5926)]
[New Thread 0x7ffff7f44700 (LWP 5927)]
[New Thread 0x7ffff7eb1700 (LWP 5928)]
AO: [jack] 44100Hz 2ch floatle (4 bytes per sample)
AO: Description: JACK audio output
AO: Author: Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>
AO: Comment: based on ao_sdl.c
Building audio filter chain for 48000Hz/2ch/floatle -> 
44100Hz/2ch/floatle...
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[libaf] Adding filter lavcresample
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit float to 
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit 
signed int conversion
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[libaf] Adding filter format
[format] Changing sample format from little-endian 16-bit signed int to 
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 
32-bit float conversion
[format] Changing sample format from little-endian 32-bit float to 
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit 
signed int conversion
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to 
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 
32-bit float conversion
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 65545
[libaf] Reallocating memory in module lavcresample, old len = 0, new len 
= 60216
[libaf] Reallocating memory in module format, old len = 0, new len = 120349
Increasing filtered audio buffer size from 0 to 120344
Increasing filtered audio buffer size from 120344 to 134808
A:   1.5 (01.4) of 0.0 (unknown)  2.0%
[aac_latm @ 0x555556383d60]audio config changed
[Thread 0x7ffff7eb1700 (LWP 5928) exited]
[Thread 0x7ffff7f44700 (LWP 5927) exited]
[Thread 0x7ffff7fc5700 (LWP 5926) exited]
Building audio filter chain for 48000Hz/6ch/floatle -> 0Hz/0ch/??...
[format] Changing sample format from little-endian 32-bit float to 
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit 
signed int conversion
[dummy] Was reinitialized: 44100Hz/6ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to 
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 
32-bit float conversion
[format] Changing sample format from little-endian 32-bit float to 
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit 
signed int conversion
[dummy] Was reinitialized: 44100Hz/6ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to 
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 
32-bit float conversion
Trying preferred audio driver 'jack', options '[none]'
[New Thread 0x7ffff7fc5700 (LWP 5929)]
[New Thread 0x7ffff7f44700 (LWP 5930)]
[New Thread 0x7ffff7eb1700 (LWP 5931)]
AO: [jack] 44100Hz 2ch floatle (4 bytes per sample)
AO: Description: JACK audio output
AO: Author: Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>
AO: Comment: based on ao_sdl.c
Building audio filter chain for 48000Hz/6ch/floatle -> 
44100Hz/2ch/floatle...
[format] Changing sample format from little-endian 32-bit float to 
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit 
signed int conversion
[dummy] Was reinitialized: 44100Hz/6ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to 
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 
32-bit float conversion
[libaf] Adding filter channels
[channels] Changing number of channels to 2
[format] Changing sample format from little-endian 16-bit signed int to 
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 
32-bit float conversion
[format] Changing sample format from little-endian 32-bit float to 
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit 
signed int conversion
[dummy] Was reinitialized: 44100Hz/6ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to 
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 
32-bit float conversion
A:   1.9 (01.9) of 0.0 (unknown)  2.1%
Program received signal SIGSEGV, Segmentation fault.
play (af=0x555556aec8a0, data=0x7fffffffd2a0) at libaf/af_lavcresample.c:154
154                   s->in[i][j + s->index]= *(in++);
(gdb) bt full
#0  play (af=0x555556aec8a0, data=0x7fffffffd2a0) at 
libaf/af_lavcresample.c:154
         s = 0x555556aec900
         i = <optimized out>
         j = <optimized out>
         consumed = <optimized out>
         ret = <optimized out>
         in = <optimized out>
         out = <optimized out>
         chans = 6
         in_len = 5456
         out_len = 5018
         tmp = 0x7ffffffe97d0
#1  0x00005555556fca19 in af_play (s=<optimized out>, data=<optimized 
out>) at libaf/af.c:572
         af = 0x555556aec8a0
#2  0x0000555555710bfb in filter_n_bytes (len=130944, sh=0x555556a791d0) 
at libmpcodecs/dec_audio.c:412
         error = 0
         filter_input = {audio = 0x555556cf4d80, len = 65472, rate = 
48000, nch = 6, format = 9, bps = 2}
         filter_output = <optimized out>
#3  mp_decode_audio (sh_audio=0x555556a791d0, minlen=131072) at 
libmpcodecs/dec_audio.c:482
         res = 0
         declen = <optimized out>
         huge_filter_buffer = 0
         unitsize = 384
         filter_multiplier = 0.30624999999999997
         max_decode_len = 130944
#4  0x000055555568e0b3 in fill_audio_out_buffers () at mplayer.c:2178
         res = <optimized out>
         playflags = <optimized out>
         audio_eof = <optimized out>
         timeout = <optimized out>
         sh_audio = 0x555556a791d0
         t = 1422351379
         playsize = 131072
         bytes_to_write = 0
         format_change = <optimized out>
#5  main (argc=5, argv=0x7fffffffe4d8) at mplayer.c:3764
         aq_sleep_time = 0
         opt_exit = <optimized out>
         i = <optimized out>



More information about the MPlayer-users mailing list