changeset 11423:c2e932f83f99 libavcodec

vp3: Set pict_type
author conrad
date Tue, 09 Mar 2010 00:29:26 +0000
parents 56266eb23fb7
children 02f402b73d62
files vp3.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vp3.c	Tue Mar 09 00:29:22 2010 +0000
+++ b/vp3.c	Tue Mar 09 00:29:26 2010 +0000
@@ -1810,6 +1810,7 @@
         return buf_size;
 
     s->current_frame.reference = 3;
+    s->current_frame.pict_type = s->keyframe ? FF_I_TYPE : FF_P_TYPE;
     if (avctx->get_buffer(avctx, &s->current_frame) < 0) {
         av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         goto error;
@@ -1836,7 +1837,9 @@
     } else {
         if (!s->golden_frame.data[0]) {
             av_log(s->avctx, AV_LOG_WARNING, "vp3: first frame not a keyframe\n");
+
             s->golden_frame.reference = 3;
+            s->golden_frame.pict_type = FF_I_TYPE;
             if (avctx->get_buffer(avctx, &s->golden_frame) < 0) {
                 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
                 goto error;