[SCM] libav/experimental: vp3: Allocate a dummy reference frame if we have no keyframe
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:03:44 UTC 2013
The following commit has been merged in the experimental branch:
commit 7a4e8b59131cccd750cfcb78e41049982c66c1aa
Author: David Conrad <lessen42 at gmail.com>
Date: Tue Mar 9 00:29:22 2010 +0000
vp3: Allocate a dummy reference frame if we have no keyframe
Originally committed as revision 22360 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index b874ee7..0143809 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1835,8 +1835,14 @@ 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");
- 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;
}
}
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list