[FFmpeg-cvslog] g726dec: add flush() function to reset state when seeking
Justin Ruggles
git at videolan.org
Thu Nov 3 02:23:07 CET 2011
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Thu Oct 27 21:33:18 2011 -0400| [da249637251869fb93bdf58de44e50b74df2ec35] | committer: Justin Ruggles
g726dec: add flush() function to reset state when seeking
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da249637251869fb93bdf58de44e50b74df2ec35
---
libavcodec/g726.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index f14958a..37b0adf 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -460,6 +460,12 @@ static int g726_decode_frame(AVCodecContext *avctx,
return buf_size;
}
+static void g726_decode_flush(AVCodecContext *avctx)
+{
+ G726Context *c = avctx->priv_data;
+ g726_reset(c);
+}
+
AVCodec ff_adpcm_g726_decoder = {
.name = "g726",
.type = AVMEDIA_TYPE_AUDIO,
@@ -467,6 +473,7 @@ AVCodec ff_adpcm_g726_decoder = {
.priv_data_size = sizeof(G726Context),
.init = g726_decode_init,
.decode = g726_decode_frame,
+ .flush = g726_decode_flush,
.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
};
#endif
More information about the ffmpeg-cvslog
mailing list