1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

dvdsubdec: implement flushing

This is needed for proper operation with seeking.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
wm4 2015-05-28 14:16:36 +02:00 committed by Michael Niedermayer
parent 0ad04bf6a2
commit 6f2c64fd03

View File

@ -719,10 +719,15 @@ static av_cold int dvdsub_init(AVCodecContext *avctx)
return 1;
}
static av_cold int dvdsub_close(AVCodecContext *avctx)
static void dvdsub_flush(AVCodecContext *avctx)
{
DVDSubContext *ctx = avctx->priv_data;
ctx->buf_size = 0;
}
static av_cold int dvdsub_close(AVCodecContext *avctx)
{
dvdsub_flush(avctx);
return 0;
}
@ -749,6 +754,7 @@ AVCodec ff_dvdsub_decoder = {
.priv_data_size = sizeof(DVDSubContext),
.init = dvdsub_init,
.decode = dvdsub_decode,
.flush = dvdsub_flush,
.close = dvdsub_close,
.priv_class = &dvdsub_class,
};