[MPlayer-cvslog] r37826 - in trunk: mencoder.c mpcommon.c mpcommon.h mplayer.c

reimar subversion at mplayerhq.hu
Wed Mar 2 22:33:35 CET 2016


Author: reimar
Date: Wed Mar  2 22:33:35 2016
New Revision: 37826

Log:
mencoder: call at least a bit of uninit/memory free code.

Modified:
   trunk/mencoder.c
   trunk/mpcommon.c
   trunk/mpcommon.h
   trunk/mplayer.c

Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c	Wed Mar  2 22:33:33 2016	(r37825)
+++ trunk/mencoder.c	Wed Mar  2 22:33:35 2016	(r37826)
@@ -1733,6 +1733,9 @@ if(sh_audio){ uninit_audio(sh_audio);sh_
 if(sh_video){ uninit_video(sh_video);sh_video=NULL; }
 if(demuxer) free_demuxer(demuxer);
 if(stream) free_stream(stream); // kill cache thread
+if(mux_v) free(mux_v->buffer);
+if(mux_a) free(mux_a->buffer);
+common_uninit();
 
 return interrupted;
 }

Modified: trunk/mpcommon.c
==============================================================================
--- trunk/mpcommon.c	Wed Mar  2 22:33:33 2016	(r37825)
+++ trunk/mpcommon.c	Wed Mar  2 22:33:35 2016	(r37826)
@@ -643,6 +643,26 @@ int common_init(void)
     return 1;
 }
 
+void common_uninit(void)
+{
+#ifdef CONFIG_FREETYPE
+    current_module = "uninit_font";
+    if (sub_font && sub_font != vo_font)
+        free_font_desc(sub_font);
+    sub_font = NULL;
+    if (vo_font)
+        free_font_desc(vo_font);
+    vo_font = NULL;
+    done_freetype();
+#endif
+    free_osd_list();
+
+#ifdef CONFIG_ASS
+    ass_library_done(ass_library);
+    ass_library = NULL;
+#endif
+}
+
 /// Returns a_pts
 double calc_a_pts(sh_audio_t *sh_audio, demux_stream_t *d_audio)
 {

Modified: trunk/mpcommon.h
==============================================================================
--- trunk/mpcommon.h	Wed Mar  2 22:33:33 2016	(r37825)
+++ trunk/mpcommon.h	Wed Mar  2 22:33:35 2016	(r37826)
@@ -83,6 +83,7 @@ int cfg_include(m_option_t *conf, const
 
 void common_preinit(int *argc_ptr, char **argv_ptr[]);
 int common_init(void);
+void common_uninit(void);
 
 double calc_a_pts(struct sh_audio *sh_audio, demux_stream_t *d_audio);
 

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Wed Mar  2 22:33:33 2016	(r37825)
+++ trunk/mplayer.c	Wed Mar  2 22:33:35 2016	(r37826)
@@ -718,22 +718,7 @@ void exit_player_with_rc(enum exit_reaso
     vo_uninit(); // Close the X11 connection (if any is open).
 #endif
 
-#ifdef CONFIG_FREETYPE
-    current_module = "uninit_font";
-    if (sub_font && sub_font != vo_font)
-        free_font_desc(sub_font);
-    sub_font = NULL;
-    if (vo_font)
-        free_font_desc(vo_font);
-    vo_font = NULL;
-    done_freetype();
-#endif
-    free_osd_list();
-
-#ifdef CONFIG_ASS
-    ass_library_done(ass_library);
-    ass_library = NULL;
-#endif
+    common_uninit();
 
     current_module = "exit_player";
 


More information about the MPlayer-cvslog mailing list