On 8/29/19, James Almer <jamr...@gmail.com> wrote:
> Signed-off-by: James Almer <jamr...@gmail.com>
> ---
>  libavcodec/qtrle.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
> index f565e0e358..ba6740f5d4 100644
> --- a/libavcodec/qtrle.c
> +++ b/libavcodec/qtrle.c
> @@ -449,6 +449,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
>                                AVPacket *avpkt)
>  {
>      QtrleContext *s = avctx->priv_data;
> +    AVFrame *frame = data;
>      int header, start_line;
>      int height, row_ptr;
>      int has_palette = 0;
> @@ -566,6 +567,12 @@ done:
>
>      if ((ret = av_frame_ref(data, s->frame)) < 0)
>          return ret;
> +    if (avpkt->flags & AV_PKT_FLAG_KEY) {
> +        frame->pict_type = AV_PICTURE_TYPE_I;
> +        frame->key_frame = 1;
> +    } else {
> +        frame->pict_type = AV_PICTURE_TYPE_P;
> +    }
>      *got_frame      = 1;
>
>      /* always report that the buffer was completely consumed */
> --
> 2.22.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


That info might not be correct or provided at all, so you need to
carefully inspect
data to get correct keyframe flag. Should not be hard to do.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to