mirror of https://git.ffmpeg.org/ffmpeg.git
dvdsubdec: implement flushing
This is needed for proper operation with seeking. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0ad04bf6a2
commit
6f2c64fd03
|
@ -719,10 +719,15 @@ static av_cold int dvdsub_init(AVCodecContext *avctx)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_cold int dvdsub_close(AVCodecContext *avctx)
|
static void dvdsub_flush(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
DVDSubContext *ctx = avctx->priv_data;
|
DVDSubContext *ctx = avctx->priv_data;
|
||||||
ctx->buf_size = 0;
|
ctx->buf_size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static av_cold int dvdsub_close(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
dvdsub_flush(avctx);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -749,6 +754,7 @@ AVCodec ff_dvdsub_decoder = {
|
||||||
.priv_data_size = sizeof(DVDSubContext),
|
.priv_data_size = sizeof(DVDSubContext),
|
||||||
.init = dvdsub_init,
|
.init = dvdsub_init,
|
||||||
.decode = dvdsub_decode,
|
.decode = dvdsub_decode,
|
||||||
|
.flush = dvdsub_flush,
|
||||||
.close = dvdsub_close,
|
.close = dvdsub_close,
|
||||||
.priv_class = &dvdsub_class,
|
.priv_class = &dvdsub_class,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue