mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
vp3: Allocate a dummy reference frame if we have no keyframe
Originally committed as revision 22360 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0c9afacbf5
commit
7a4e8b5913
@ -1835,9 +1835,15 @@ static int vp3_decode_frame(AVCodecContext *avctx,
|
||||
}
|
||||
} else {
|
||||
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");
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
s->current_frame.qscale_table= s->qscale_table; //FIXME allocate individual tables per AVFrame
|
||||
|
Loading…
x
Reference in New Issue
Block a user