Skip non intra frames that have no reference frames.
Originally committed as revision 18395 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
440882f7be
commit
69409ccb80
@ -4145,6 +4145,10 @@ static int frame_start(SnowContext *s){
|
|||||||
if(i && s->last_picture[i-1].key_frame)
|
if(i && s->last_picture[i-1].key_frame)
|
||||||
break;
|
break;
|
||||||
s->ref_frames= i;
|
s->ref_frames= i;
|
||||||
|
if(s->ref_frames==0){
|
||||||
|
av_log(s->avctx,AV_LOG_ERROR, "No reference frames\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s->current_picture.reference= 1;
|
s->current_picture.reference= 1;
|
||||||
@ -4520,7 +4524,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||||||
|
|
||||||
alloc_blocks(s);
|
alloc_blocks(s);
|
||||||
|
|
||||||
frame_start(s);
|
if(frame_start(s) < 0)
|
||||||
|
return -1;
|
||||||
//keyframe flag duplication mess FIXME
|
//keyframe flag duplication mess FIXME
|
||||||
if(avctx->debug&FF_DEBUG_PICT_INFO)
|
if(avctx->debug&FF_DEBUG_PICT_INFO)
|
||||||
av_log(avctx, AV_LOG_ERROR, "keyframe:%d qlog:%d\n", s->keyframe, s->qlog);
|
av_log(avctx, AV_LOG_ERROR, "keyframe:%d qlog:%d\n", s->keyframe, s->qlog);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user