Commit 84423b21 authored by conrad's avatar conrad

vp3: Allocate a dummy reference frame if we have no keyframe

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22360 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ae1712b0
...@@ -1835,8 +1835,14 @@ static int vp3_decode_frame(AVCodecContext *avctx, ...@@ -1835,8 +1835,14 @@ static int vp3_decode_frame(AVCodecContext *avctx,
} }
} else { } else {
if (!s->golden_frame.data[0]) { if (!s->golden_frame.data[0]) {
av_log(s->avctx, AV_LOG_ERROR, "vp3: first frame not a keyframe\n"); av_log(s->avctx, AV_LOG_WARNING, "vp3: first frame not a keyframe\n");
goto error; s->golden_frame.reference = 3;
if (avctx->get_buffer(avctx, &s->golden_frame) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
goto error;
}
s->last_frame = s->golden_frame;
s->last_frame.type = FF_BUFFER_TYPE_COPY;
} }
} }
......
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