You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avcodec/qtrle: add a flush() callback
The reference frame isn't valid after seeking Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -554,6 +554,14 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
|
|||||||
return avpkt->size;
|
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)
|
static av_cold int qtrle_decode_end(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
QtrleContext *s = avctx->priv_data;
|
QtrleContext *s = avctx->priv_data;
|
||||||
@@ -572,5 +580,6 @@ AVCodec ff_qtrle_decoder = {
|
|||||||
.init = qtrle_decode_init,
|
.init = qtrle_decode_init,
|
||||||
.close = qtrle_decode_end,
|
.close = qtrle_decode_end,
|
||||||
.decode = qtrle_decode_frame,
|
.decode = qtrle_decode_frame,
|
||||||
|
.flush = qtrle_decode_flush,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.capabilities = AV_CODEC_CAP_DR1,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user