[FFmpeg-cvslog] libavfilter/lavfutils: remove useless NULL check on codec context
Michael Niedermayer
git at videolan.org
Wed Oct 17 20:35:54 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 17 19:55:13 2012 +0200| [fd9e88fe6018bc72cd0aa10afc3c1a68df8c6558] | committer: Michael Niedermayer
libavfilter/lavfutils: remove useless NULL check on codec context
The code would crash before if it was NULL
Fixes CID733804
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd9e88fe6018bc72cd0aa10afc3c1a68df8c6558
---
libavfilter/lavfutils.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c
index a4711f9..62cf167 100644
--- a/libavfilter/lavfutils.c
+++ b/libavfilter/lavfutils.c
@@ -85,8 +85,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4],
av_image_copy(data, linesize, (const uint8_t **)frame->data, frame->linesize, *pix_fmt, *w, *h);
end:
- if (codec_ctx)
- avcodec_close(codec_ctx);
+ avcodec_close(codec_ctx);
if (format_ctx)
avformat_close_input(&format_ctx);
av_freep(&frame);
More information about the ffmpeg-cvslog
mailing list