Commit 8bcebf9e authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '555000c7'

* commit '555000c7':
  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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 87d263a1 555000c7
...@@ -2685,8 +2685,9 @@ static void flush_dpb(AVCodecContext *avctx) ...@@ -2685,8 +2685,9 @@ static void flush_dpb(AVCodecContext *avctx)
flush_change(h); flush_change(h);
for (i = 0; i < MAX_PICTURE_COUNT; i++) if (h->DPB)
unref_picture(h, &h->DPB[i]); for (i = 0; i < MAX_PICTURE_COUNT; i++)
unref_picture(h, &h->DPB[i]);
h->cur_pic_ptr = NULL; h->cur_pic_ptr = NULL;
unref_picture(h, &h->cur_pic); unref_picture(h, &h->cur_pic);
......
...@@ -202,12 +202,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) ...@@ -202,12 +202,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
GradFunContext *gf = inlink->dst->priv; GradFunContext *gf = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out; AVFrame *out;
int p, direct = 0; int p, direct;
if (av_frame_is_writable(in)) { if (av_frame_is_writable(in)) {
direct = 1; direct = 1;
out = in; out = in;
} else { } else {
direct = 0;
out = ff_get_video_buffer(outlink, outlink->w, outlink->h); out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out) { if (!out) {
av_frame_free(&in); av_frame_free(&in);
......
...@@ -310,12 +310,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) ...@@ -310,12 +310,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out; AVFrame *out;
int direct = 0, c; int direct, c;
if (av_frame_is_writable(in)) { if (av_frame_is_writable(in)) {
direct = 1; direct = 1;
out = in; out = in;
} else { } else {
direct = 0;
out = ff_get_video_buffer(outlink, outlink->w, outlink->h); out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out) { if (!out) {
av_frame_free(&in); av_frame_free(&in);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment