[MPlayer-dev-eng] [PATCH] uninit_audio in mencoder

Vladislav Naumov vnaum at pochta.ru
Sat Jul 30 07:51:18 CEST 2005


When I was writing volnorm2 I discovered that mencoder
(unlike mplayer)
doesn't uninit audio filters after encoding.
So volnorm2 was unable to report peak values after
processing.

This patch fixes this.
I don't know if it is the best place for uniniting,
I just put uninit_audio where everything else is
uninitialised.
It works.
-------------- next part --------------
diff -Naur MPlayer.orig/mencoder.c MPlayer.my/mencoder.c
--- MPlayer.orig/mencoder.c	2005-07-29 15:35:38.000000000 +0700
+++ MPlayer.my/mencoder.c	2005-07-30 10:59:00.031197784 +0700
@@ -1509,6 +1509,7 @@
 mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_AudioStreamResult,
     (float)(mux_a->size/mux_a->timer*8.0f/1000.0f), (int)(mux_a->size/mux_a->timer), (int)mux_a->size, (float)mux_a->timer);
 
+if(sh_audio) { uninit_audio(sh_audio); sh_audio=NULL; }
 if(sh_video){ uninit_video(sh_video);sh_video=NULL; }
 if(demuxer) free_demuxer(demuxer);
 if(stream) free_stream(stream); // kill cache thread


More information about the MPlayer-dev-eng mailing list