[MPlayer-cvslog] r19485 - trunk/libmpdemux/demuxer.c

nicodvb subversion at mplayerhq.hu
Mon Aug 21 21:52:11 CEST 2006


Author: nicodvb
Date: Mon Aug 21 21:52:11 2006
New Revision: 19485

Modified:
   trunk/libmpdemux/demuxer.c

Log:
100l: *chapter_name was copied from the pointer rather than strupd()-ed (and next free()d in mplayer.c

Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c	(original)
+++ trunk/libmpdemux/demuxer.c	Mon Aug 21 21:52:11 2006
@@ -1135,8 +1135,11 @@
         if(num_chapters)
             *num_chapters = demuxer->num_chapters;
 
-        if(chapter_name)
-            *chapter_name = demuxer->chapters[current].name;
+        if(chapter_name) {
+            if(demuxer->chapters[current].name)
+                *chapter_name = strdup(demuxer->chapters[current].name);
+            else *chapter_name = NULL;
+        }
 
         return current;
     }



More information about the MPlayer-cvslog mailing list