mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:21:11 +01:00
avcodec/msrle: add a flush() callback
The reference frame isn't valid after seeking.
This commit is contained in:
parent
59e651c052
commit
0067da587a
1 changed files with 8 additions and 0 deletions
|
|
@ -148,6 +148,13 @@ static int msrle_decode_frame(AVCodecContext *avctx,
|
|||
return buf_size;
|
||||
}
|
||||
|
||||
static void msrle_decode_flush(AVCodecContext *avctx)
|
||||
{
|
||||
MsrleContext *s = avctx->priv_data;
|
||||
|
||||
av_frame_unref(s->frame);
|
||||
}
|
||||
|
||||
static av_cold int msrle_decode_end(AVCodecContext *avctx)
|
||||
{
|
||||
MsrleContext *s = avctx->priv_data;
|
||||
|
|
@ -167,5 +174,6 @@ AVCodec ff_msrle_decoder = {
|
|||
.init = msrle_decode_init,
|
||||
.close = msrle_decode_end,
|
||||
.decode = msrle_decode_frame,
|
||||
.flush = msrle_decode_flush,
|
||||
.capabilities = AV_CODEC_CAP_DR1,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue