diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-13 13:32:59 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-13 13:34:06 +0100 |
commit | 8bcebf9e4a480de4a904b5843e9ecb74cf44bfdf (patch) | |
tree | baf634156394d6b143873b6c423a1c5819e17b1f | |
parent | 87d263a122f6212c236531f8586598605ecab87c (diff) | |
parent | 555000c7d5c1e13043a948ebc48d2939b0ba6536 (diff) | |
download | ffmpeg-8bcebf9e4a480de4a904b5843e9ecb74cf44bfdf.tar.gz |
Merge commit '555000c7d5c1e13043a948ebc48d2939b0ba6536'
* commit '555000c7d5c1e13043a948ebc48d2939b0ba6536':
h264: check that DPB is allocated before accessing it in flush_dpb()
vf_hqdn3d: fix uninitialized variable use
vf_gradfun: fix uninitialized variable use
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 5 | ||||
-rw-r--r-- | libavfilter/vf_gradfun.c | 3 | ||||
-rw-r--r-- | libavfilter/vf_hqdn3d.c | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index dec428965b..2e7204d933 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2685,8 +2685,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); diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index c749534ad9..9e377614ae 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -202,12 +202,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) GradFunContext *gf = inlink->dst->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; AVFrame *out; - int p, direct = 0; + int p, direct; if (av_frame_is_writable(in)) { direct = 1; out = in; } else { + direct = 0; out = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) { av_frame_free(&in); diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 5274956d8d..5b6800c893 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -310,12 +310,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) AVFilterLink *outlink = inlink->dst->outputs[0]; AVFrame *out; - int direct = 0, c; + int direct, c; if (av_frame_is_writable(in)) { direct = 1; out = in; } else { + direct = 0; out = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) { av_frame_free(&in); |