[FFmpeg-cvslog] ffv1: clear slice state in decode_slice()
Michael Niedermayer
git at videolan.org
Fri Apr 20 15:43:15 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 20 14:55:09 2012 +0200| [8456089f5066104eb392be04ef7a1f532e182c28] | committer: Michael Niedermayer
ffv1: clear slice state in decode_slice()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8456089f5066104eb392be04ef7a1f532e182c28
---
libavcodec/ffv1.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index df3949c..7d985f0 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1508,6 +1508,9 @@ static int decode_slice(AVCodecContext *c, void *arg){
const int ps= (c->bits_per_raw_sample>8)+1;
AVFrame * const p= &f->picture;
+ if(f->picture.key_frame)
+ clear_slice_state(f, fs);
+
av_assert1(width && height);
if(f->colorspace==0){
const int chroma_width = -((-width )>>f->chroma_h_shift);
@@ -1839,8 +1842,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
return -1;
if(init_slices_state(f) < 0)
return -1;
-
- clear_state(f);
}else{
p->key_frame= 0;
}
More information about the ffmpeg-cvslog
mailing list