aboutsummaryrefslogtreecommitdiffstats
path: root/vhook/watermark.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-08-18 08:05:24 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-08-18 08:05:24 +0000
commitb4902c11c157a3abdb921ec9b36880c600b55267 (patch)
tree3d8218bfeb39d009b7ed343c40ac0368a7018261 /vhook/watermark.c
parent0b23d689d850c636ba4594b578007aa2b0fdc88a (diff)
downloadffmpeg-b4902c11c157a3abdb921ec9b36880c600b55267.tar.gz
av_free* cleanup
Originally committed as revision 6019 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'vhook/watermark.c')
-rw-r--r--vhook/watermark.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/vhook/watermark.c b/vhook/watermark.c
index e88dd1b30b..c64e93ae91 100644
--- a/vhook/watermark.c
+++ b/vhook/watermark.c
@@ -102,8 +102,7 @@ void Release(void *ctx)
if (ci) get_watermark_picture(ci, 1);
- if (ctx)
- av_free(ctx);
+ av_free(ctx);
}
@@ -556,14 +555,8 @@ int get_watermark_picture(ContextInfo *ci, int cleanup)
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) {