[SCM] libav/experimental: clear bitstream buffers in AVCodec.flush()

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:37:01 UTC 2013


The following commit has been merged in the experimental branch:
commit 769fc4660cba3768737692a8e82f25c076e05cdb
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sat Aug 2 22:01:02 2003 +0000

    clear bitstream buffers in AVCodec.flush()
    
    Originally committed as revision 2101 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index f7525bf..1b01aa3 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

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list