[FFmpeg-devel] [PATCH 2/2] dvdsubdec: implement flushing
wm4
nfxjfg at googlemail.com
Thu May 28 14:16:36 CEST 2015
This is needed for proper operation with seeking.
---
libavcodec/dvdsubdec.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 5abf014..08a1500 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,
};
--
2.1.4
More information about the ffmpeg-devel
mailing list