[Ffmpeg-cvslog] r6019 - trunk/vhook/watermark.c

michael subversion
Fri Aug 18 10:05:25 CEST 2006


Author: michael
Date: Fri Aug 18 10:05:24 2006
New Revision: 6019

Modified:
   trunk/vhook/watermark.c

Log:
av_free* cleanup


Modified: trunk/vhook/watermark.c
==============================================================================
--- trunk/vhook/watermark.c	(original)
+++ trunk/vhook/watermark.c	Fri Aug 18 10:05:24 2006
@@ -102,8 +102,7 @@
 
     if (ci) get_watermark_picture(ci, 1);
 
-    if (ctx)
-        av_free(ctx);
+    av_free(ctx);
 }
 
 
@@ -556,14 +555,8 @@
     if (0 != cleanup)
     {
         // Free the RGB image
-        if (0 != ci->buffer) {
-            av_free(ci->buffer);
-            ci->buffer = 0;
-        }
-        if (0 != ci->pFrameRGB) {
-            av_free(ci->pFrameRGB);
-            ci->pFrameRGB = 0;
-        }
+        av_freep(&ci->buffer);
+        av_freep(&ci->pFrameRGB);
 
         // Close the codec
         if (0 != ci->pCodecCtx) {




More information about the ffmpeg-cvslog mailing list