mirror of https://git.ffmpeg.org/ffmpeg.git
ffv1: clear slice state in decode_slice()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c7a435aab2
commit
8456089f50
|
@ -1508,6 +1508,9 @@ static int decode_slice(AVCodecContext *c, void *arg){
|
||||||
const int ps= (c->bits_per_raw_sample>8)+1;
|
const int ps= (c->bits_per_raw_sample>8)+1;
|
||||||
AVFrame * const p= &f->picture;
|
AVFrame * const p= &f->picture;
|
||||||
|
|
||||||
|
if(f->picture.key_frame)
|
||||||
|
clear_slice_state(f, fs);
|
||||||
|
|
||||||
av_assert1(width && height);
|
av_assert1(width && height);
|
||||||
if(f->colorspace==0){
|
if(f->colorspace==0){
|
||||||
const int chroma_width = -((-width )>>f->chroma_h_shift);
|
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;
|
return -1;
|
||||||
if(init_slices_state(f) < 0)
|
if(init_slices_state(f) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
clear_state(f);
|
|
||||||
}else{
|
}else{
|
||||||
p->key_frame= 0;
|
p->key_frame= 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue