changeset 3161:e3e94632c6e9 libavcodec

keyframe flag was wrong if SEIs followed the keyframe
author lorenm
date Sat, 04 Mar 2006 03:57:33 +0000
parents 25f6245381be
children f4597d12563b
files h264.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Fri Mar 03 21:33:06 2006 +0000
+++ b/h264.c	Sat Mar 04 03:57:33 2006 +0000
@@ -7548,6 +7548,7 @@
                 av_log(h->s.avctx, AV_LOG_ERROR, "decode_slice_header error\n");
                 break;
             }
+            s->current_picture_ptr->key_frame= (h->nal_unit_type == NAL_IDR_SLICE);
             if(h->redundant_pic_count==0 && s->hurry_up < 5
                && (avctx->skip_frame < AVDISCARD_NONREF || h->nal_ref_idc)
                && (avctx->skip_frame < AVDISCARD_BIDIR  || h->slice_type!=B_TYPE)
@@ -7617,7 +7618,6 @@
 
     s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264;
     s->current_picture_ptr->pict_type= s->pict_type;
-    s->current_picture_ptr->key_frame= s->pict_type == I_TYPE && h->nal_unit_type == NAL_IDR_SLICE;
 
     h->prev_frame_num_offset= h->frame_num_offset;
     h->prev_frame_num= h->frame_num;