diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-07-19 02:44:17 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-07-19 02:44:17 +0000 |
commit | 1b547abaa34a416d10891202ec09cf918d30d329 (patch) | |
tree | 9e4dfa5addeff1148fe1cec22fe8411680b0a23e | |
parent | 34e0d78936588b5b1f44fcbbf1baca3a166a672c (diff) | |
download | ffmpeg-1b547abaa34a416d10891202ec09cf918d30d329.tar.gz |
Drop out of order pics even if bitstream_restriction_flag is set.
Originally committed as revision 14288 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 862e7a0da5..a40d4d7b6e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -7861,10 +7861,12 @@ static int decode_frame(AVCodecContext *avctx, } 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) { } - 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) || (s->low_delay && ((!cross_idr && prev && out->poc > prev->poc + 2) @@ -7874,8 +7876,6 @@ static int decode_frame(AVCodecContext *avctx, s->avctx->has_b_frames++; out = prev; } - else if(out_of_order) - out = prev; if(out_of_order || pics > s->avctx->has_b_frames){ for(i=out_idx; h->delayed_pic[i]; i++) |