Fully reinit audio chain on format change.
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 18 Jan 2014 20:41:46 +0000 (20:41 +0000)
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 18 Jan 2014 20:41:46 +0000 (20:41 +0000)
This ensures that we insert all necessary filters like
downmixing, but loses the current settings like volume or
equalizer that were set at runtime.

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@36612 b3059339-0415-0410-9bf9-f77b7e298cf2

mplayer.c

index 8e46379..5f751cc 100644 (file)
--- a/mplayer.c
+++ b/mplayer.c
@@ -2221,6 +2221,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;