changeset 10959:905acfd20c59

fix a memory leak when playing several files in a row (playlist for instance)
author pl
date Mon, 29 Sep 2003 09:53:27 +0000
parents 4dc1203f8004
children 673705a8b09a
files mplayer.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Mon Sep 29 08:24:14 2003 +0000
+++ b/mplayer.c	Mon Sep 29 09:53:27 2003 +0000
@@ -1270,8 +1270,14 @@
 
   stream=NULL;
   demuxer=NULL;
-  d_audio=NULL;
-  d_video=NULL;
+  if (d_audio) {
+    free_demuxer_stream(d_audio);
+    d_audio=NULL;
+  }
+  if (d_video) {
+    free_demuxer_stream(d_video);
+    d_video=NULL;
+  }
   sh_audio=NULL;
   sh_video=NULL;