[Ffmpeg-cvslog] CVS: ffmpeg ffmpeg.c,1.337,1.338

Michael Niedermayer CVS michael
Sun Jul 17 02:28:14 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg
In directory mail:/var2/tmp/cvs-serv17566

Modified Files:
	ffmpeg.c 
Log Message:
DVB subtitle decoder by (Ian Caulfield: imc25, cam ac uk)


Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffmpeg.c,v
retrieving revision 1.337
retrieving revision 1.338
diff -u -d -r1.337 -r1.338
--- ffmpeg.c	11 Jul 2005 22:15:58 -0000	1.337
+++ ffmpeg.c	17 Jul 2005 00:28:11 -0000	1.338
@@ -1423,8 +1423,14 @@
             av_free(buffer_to_free);
             /* XXX: allocate the subtitles in the codec ? */
             if (subtitle_to_free) {
-                av_free(subtitle_to_free->bitmap);
-                av_free(subtitle_to_free->rgba_palette);
+                if (subtitle_to_free->rects != NULL) {
+                    for (i = 0; i < subtitle_to_free->num_rects; i++) {
+                        av_free(subtitle_to_free->rects[i].bitmap);
+                        av_free(subtitle_to_free->rects[i].rgba_palette);
+                    }
+                    av_freep(&subtitle_to_free->rects);
+                }
+                subtitle_to_free->num_rects = 0;
                 subtitle_to_free = NULL;
             }
         }





More information about the ffmpeg-cvslog mailing list