[FFmpeg-cvslog] dvdsubdec: implement flushing
wm4
git at videolan.org
Thu May 28 16:19:54 CEST 2015
ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Thu May 28 14:16:36 2015 +0200| [6f2c64fd03a17c804334df8b8406bf7dd1b92c88] | committer: Michael Niedermayer
dvdsubdec: implement flushing
This is needed for proper operation with seeking.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6f2c64fd03a17c804334df8b8406bf7dd1b92c88
---
libavcodec/dvdsubdec.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index a87a3bc..7120f10 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,
};
More information about the ffmpeg-cvslog
mailing list