[FFmpeg-cvslog] r22360 - trunk/libavcodec/vp3.c
conrad
subversion
Tue Mar 9 01:29:23 CET 2010
Author: conrad
Date: Tue Mar 9 01:29:22 2010
New Revision: 22360
Log:
vp3: Allocate a dummy reference frame if we have no keyframe
Modified:
trunk/libavcodec/vp3.c
Modified: trunk/libavcodec/vp3.c
==============================================================================
--- trunk/libavcodec/vp3.c Tue Mar 9 01:29:19 2010 (r22359)
+++ trunk/libavcodec/vp3.c Tue Mar 9 01:29:22 2010 (r22360)
@@ -1835,8 +1835,14 @@ static int vp3_decode_frame(AVCodecConte
}
} else {
if (!s->golden_frame.data[0]) {
- av_log(s->avctx, AV_LOG_ERROR, "vp3: first frame not a keyframe\n");
- goto error;
+ 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;
}
}
More information about the ffmpeg-cvslog
mailing list