Commit 3864ceb6 authored by michael's avatar michael

Drop out of order pics even if bitstream_restriction_flag is set.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14288 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a07708d0
...@@ -7861,10 +7861,12 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -7861,10 +7861,12 @@ static int decode_frame(AVCodecContext *avctx,
} }
out_of_order = !cross_idr && prev && out->poc < prev->poc; out_of_order = !cross_idr && prev && out->poc < prev->poc;
if(prev && pics <= s->avctx->has_b_frames || out_of_order)
out = prev;
if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames) if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames)
{ } { }
else if(prev && pics <= s->avctx->has_b_frames)
out = prev;
else if((out_of_order && pics-1 == s->avctx->has_b_frames && pics < 15) else if((out_of_order && pics-1 == s->avctx->has_b_frames && pics < 15)
|| (s->low_delay && || (s->low_delay &&
((!cross_idr && prev && out->poc > prev->poc + 2) ((!cross_idr && prev && out->poc > prev->poc + 2)
...@@ -7874,8 +7876,6 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -7874,8 +7876,6 @@ static int decode_frame(AVCodecContext *avctx,
s->avctx->has_b_frames++; s->avctx->has_b_frames++;
out = prev; out = prev;
} }
else if(out_of_order)
out = prev;
if(out_of_order || pics > s->avctx->has_b_frames){ if(out_of_order || pics > s->avctx->has_b_frames){
for(i=out_idx; h->delayed_pic[i]; i++) for(i=out_idx; h->delayed_pic[i]; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment