Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-05-28 15:16:36 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-05-28 17:10:56 +0300
commit6f2c64fd03a17c804334df8b8406bf7dd1b92c88 (patch)
tree9ccc9af51d6fd70eba7f8188bf370f605a29f8e4 /libavcodec/dvdsubdec.c
parent0ad04bf6a29ee54374370d9fe1a6543439d6aa02 (diff)
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.c8
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,
};