changeset 36516:b726218447c9

Fully reinit audio chain on format change. This ensures that we insert all necessary filters like downmixing, but loses the current settings like volume or equalizer that were set at runtime.
author reimar
date Sat, 18 Jan 2014 20:41:46 +0000
parents 9145ee6c5238
children 5d3f93051de9
files mplayer.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat Jan 18 18:34:37 2014 +0000
+++ b/mplayer.c	Sat Jan 18 20:41:46 2014 +0000
@@ -2221,6 +2221,9 @@
     }
     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;