avcodec/hevc: fix outputted AVFrame.key_frame
authorPeter Kovář <peter.kovar@gmail.com>
Wed, 14 May 2014 17:42:44 +0000 (19:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 14 May 2014 18:30:44 +0000 (20:30 +0200)
previously it was always 1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hevc_refs.c

index 24d55d1..91347cf 100644 (file)
@@ -207,6 +207,9 @@ int ff_hevc_output_frame(HEVCContext *s, AVFrame *out, int flush)
                           (frame->window.top_offset   >> vshift) * dst->linesize[i];
                 dst->data[i] += off;
             }
+
+            out->key_frame = out->pict_type == AV_PICTURE_TYPE_I;
+
             av_log(s->avctx, AV_LOG_DEBUG,
                    "Output frame with POC %d.\n", frame->poc);
             return 1;