Message ID | 20200910214901.25401-1-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 3d1a9824b8e7f5ad52447cc2d60beffc9e66ff67 |
Headers | show |
Series | [FFmpeg-devel,1/9] avfilter/lavfutils: Don't use uninitialized pointers for freeing | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Thu, Sep 10, 2020 at 11:48:53PM +0200, Andreas Rheinhardt wrote: > Happened on several error conditions, e.g. if there is just no decoder > for the format (like with svg images). > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavfilter/lavfutils.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) lgtm > > 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; > -- > 2.20.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
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;
Happened on several error conditions, e.g. if there is just no decoder for the format (like with svg images). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavfilter/lavfutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)