[FFmpeg-devel] [PATCH] avcodec/qtrle: add a flush() callback
Paul B Mahol
onemda at gmail.com
Tue Aug 27 09:09:40 EEST 2019
LGTM
On Mon, Aug 26, 2019 at 8:28 PM James Almer <jamrial at gmail.com> wrote:
> The reference frame isn't valid after seeking
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> libavcodec/qtrle.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
> index 3255c64063..1021986f01 100644
> --- a/libavcodec/qtrle.c
> +++ b/libavcodec/qtrle.c
> @@ -571,6 +571,14 @@ done:
> return avpkt->size;
> }
>
> +static void qtrle_decode_flush(AVCodecContext *avctx)
> +{
> + QtrleContext *s = avctx->priv_data;
> +
> + memset(s->pal, 0, sizeof(s->pal));
> + av_frame_unref(s->frame);
> +}
> +
> static av_cold int qtrle_decode_end(AVCodecContext *avctx)
> {
> QtrleContext *s = avctx->priv_data;
> @@ -589,5 +597,6 @@ AVCodec ff_qtrle_decoder = {
> .init = qtrle_decode_init,
> .close = qtrle_decode_end,
> .decode = qtrle_decode_frame,
> + .flush = qtrle_decode_flush,
> .capabilities = AV_CODEC_CAP_DR1,
> };
> --
> 2.22.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list