From 887d31d455915b6bde6814063384dafdee61164c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 28 Feb 2013 08:47:21 +0100 Subject: [PATCH 1/3] vf_gradfun: fix uninitialized variable use CC:libav-stable@libav.org --- libavfilter/vf_gradfun.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index 05412cffcc..ca7ef69144 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -193,6 +193,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) direct = 1; out = in; } else { + direct = 0; out = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) { av_frame_free(&in); From d0a863ac891eae49ceaa4de7f759270bc87e668d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 28 Feb 2013 08:47:21 +0100 Subject: [PATCH 2/3] vf_hqdn3d: fix uninitialized variable use CC:libav-stable@libav.org --- libavfilter/vf_hqdn3d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 3251b6ffc1..50e904b940 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -316,6 +316,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) direct = 1; out = in; } else { + direct = 0; out = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) { av_frame_free(&in); From 555000c7d5c1e13043a948ebc48d2939b0ba6536 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 10 Mar 2013 23:28:31 +0100 Subject: [PATCH 3/3] h264: check that DPB is allocated before accessing it in flush_dpb() --- libavcodec/h264.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index de5ca403ae..e0d5433a4e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2623,8 +2623,9 @@ static void flush_dpb(AVCodecContext *avctx) flush_change(h); - for (i = 0; i < MAX_PICTURE_COUNT; i++) - unref_picture(h, &h->DPB[i]); + if (h->DPB) + for (i = 0; i < MAX_PICTURE_COUNT; i++) + unref_picture(h, &h->DPB[i]); h->cur_pic_ptr = NULL; unref_picture(h, &h->cur_pic);