[FFmpeg-cvslog] ffv1: move clear_state() to clear_slice_state() in encoding threads
Michael Niedermayer
git at videolan.org
Wed Apr 25 18:23:55 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 25 18:02:43 2012 +0200| [83bf9fb6eca8cb9afd2a507ea20bec7f2cb429d2] | committer: Michael Niedermayer
ffv1: move clear_state() to clear_slice_state() in encoding threads
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83bf9fb6eca8cb9afd2a507ea20bec7f2cb429d2
---
libavcodec/ffv1.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index e03778e..4df005f 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1196,6 +1196,8 @@ static int encode_slice(AVCodecContext *c, void *arg){
AVFrame * const p= &f->picture;
const int ps= (f->bits_per_raw_sample>8)+1;
+ if(p->key_frame)
+ clear_slice_state(f, fs);
if(f->version > 2){
encode_slice_header(f, fs);
}
@@ -1252,7 +1254,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
p->key_frame= 1;
f->gob_count++;
write_header(f);
- clear_state(f);
}else{
put_rac(c, &keystate, 0);
p->key_frame= 0;
More information about the ffmpeg-cvslog
mailing list