[FFmpeg-devel] HEVC decoder always outputs key_frame equal to 1

Michael Niedermayer michaelni at gmx.at
Wed May 14 20:34:06 CEST 2014


On Wed, May 14, 2014 at 07:42:44PM +0200, Peter Kovář wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Here is a patch to the HEVC decoder.
> 
> diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c
> index 24d55d1..91347cf 100644
> - --- a/libavcodec/hevc_refs.c
> +++ b/libavcodec/hevc_refs.c
> @@ -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;

applied

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140514/91951f5e/attachment.asc>


More information about the ffmpeg-devel mailing list