diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-05-28 14:16:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-28 16:10:56 +0200 |
commit | 6f2c64fd03a17c804334df8b8406bf7dd1b92c88 (patch) | |
tree | 9ccc9af51d6fd70eba7f8188bf370f605a29f8e4 /libavcodec/dvdsubdec.c | |
parent | 0ad04bf6a29ee54374370d9fe1a6543439d6aa02 (diff) | |
download | ffmpeg-6f2c64fd03a17c804334df8b8406bf7dd1b92c88.tar.gz |
dvdsubdec: implement flushing
This is needed for proper operation with seeking.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvdsubdec.c')
-rw-r--r-- | libavcodec/dvdsubdec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index a87a3bcdd4..7120f10a53 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -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, }; |