[MPlayer-users] Crash with -ao jack when channel layout changes in a broadcast aac/latm stream when resample needed.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Wed Dec 11 20:41:25 CET 2013
On Wed, Dec 11, 2013 at 12:27:22PM +0000, Andy Furniss wrote:
> 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.
I am not sure it will fix the reason for the crash (that seems partially
unrelated), but below patch seems to avoid the issue by fully rebuilding
the filter chain.
Unfortunately it means that runtime-changes like volume etc. will
get lost every time.
Note that there might be an additional issue with FFmpeg not respecting
that only 2 channels were requested - I don't know if the AAC decoder
is supposed to respect that or not.
--- a/mplayer.c
+++ b/mplayer.c
@@ -2218,6 +2218,9 @@ static int fill_audio_out_buffers(void)
}
if (format_change) {
uninit_player(INITIALIZED_AO);
+ af_uninit(sh_audio->afilter);
+ free(sh_audio->afilter);
+ sh_audio->afilter = NULL;
reinit_audio_chain();
}
return 1;
More information about the MPlayer-users
mailing list