diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-10 15:36:11 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-11 14:39:38 +0200 |
commit | 3d1a9824b8e7f5ad52447cc2d60beffc9e66ff67 (patch) | |
tree | 81ebc3d8288e41d7447331207d0bac4739696230 /libavfilter/lavfutils.c | |
parent | 5fc3eda8de40a7fb19a8052dde39325eaad38ba5 (diff) | |
download | ffmpeg-3d1a9824b8e7f5ad52447cc2d60beffc9e66ff67.tar.gz |
avfilter/lavfutils: Don't use uninitialized pointers for freeing
Happened on several error conditions, e.g. if there is just no decoder
for the format (like with svg images).
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/lavfutils.c')
-rw-r--r-- | libavfilter/lavfutils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index db4b69b9f3..84dd4c0704 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -28,9 +28,9 @@ int ff_load_image(uint8_t *data[4], int linesize[4], AVInputFormat *iformat = NULL; AVFormatContext *format_ctx = NULL; AVCodec *codec; - AVCodecContext *codec_ctx; + AVCodecContext *codec_ctx = NULL; AVCodecParameters *par; - AVFrame *frame; + AVFrame *frame = NULL; int frame_decoded, ret = 0; AVPacket pkt; AVDictionary *opt=NULL; |