Commit 6f2c64fd authored by wm4's avatar wm4 Committed by Michael Niedermayer

dvdsubdec: implement flushing

This is needed for proper operation with seeking.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0ad04bf6
......@@ -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,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment