aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-08-02 22:01:02 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-08-02 22:01:02 +0000
commit769fc4660cba3768737692a8e82f25c076e05cdb (patch)
tree10d3f9ddf069b8bb15318685aaa3e3656d410178
parent6a686d58b4e2ea0ec0e92cdd34afe766022d2f27 (diff)
downloadffmpeg-769fc4660cba3768737692a8e82f25c076e05cdb.tar.gz
clear bitstream buffers in AVCodec.flush()
Originally committed as revision 2101 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegvideo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index f7525bffd0..1b01aa32d5 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -3095,6 +3095,13 @@ void ff_mpeg_flush(AVCodecContext *avctx){
avctx->release_buffer(avctx, (AVFrame*)&s->picture[i]);
}
s->last_picture_ptr = s->next_picture_ptr = NULL;
+
+ s->parse_context.state= -1;
+ s->parse_context.frame_start_found= 0;
+ s->parse_context.overread= 0;
+ s->parse_context.overread_index= 0;
+ s->parse_context.index= 0;
+ s->parse_context.last_index= 0;
}
#ifdef CONFIG_ENCODERS