aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaruhiko Yamagata <h.yamagata@nifty.com>2009-06-20 13:16:07 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2009-06-20 13:16:07 +0000
commit6ee0eb38c015d7bf139b0058e4d28244830d9d01 (patch)
tree1b3dd386191e6765c12dce41c6d31c5a802b8848
parent1efe9fd5c0f0b389e54ea8750bd2346251cdf5ee (diff)
downloadffmpeg-6ee0eb38c015d7bf139b0058e4d28244830d9d01.tar.gz
Fix H.264 picture reordering.
Patch by Haruhiko Yamagata, h D yamagata A nifty D com Originally committed as revision 19239 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 55553ed313..23d5b10390 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -7708,7 +7708,7 @@ static int decode_frame(AVCodecContext *avctx,
//FIXME factorize this with the output code below
out = h->delayed_pic[0];
out_idx = 0;
- for(i=1; h->delayed_pic[i] && (h->delayed_pic[i]->poc && !h->delayed_pic[i]->key_frame); i++)
+ for(i=1; h->delayed_pic[i] && !h->delayed_pic[i]->key_frame; i++)
if(h->delayed_pic[i]->poc < out->poc){
out = h->delayed_pic[i];
out_idx = i;
@@ -7884,12 +7884,12 @@ static int decode_frame(AVCodecContext *avctx,
out = h->delayed_pic[0];
out_idx = 0;
- for(i=1; h->delayed_pic[i] && (h->delayed_pic[i]->poc && !h->delayed_pic[i]->key_frame); i++)
+ for(i=1; h->delayed_pic[i] && !h->delayed_pic[i]->key_frame; i++)
if(h->delayed_pic[i]->poc < out->poc){
out = h->delayed_pic[i];
out_idx = i;
}
- cross_idr = !h->delayed_pic[0]->poc || !!h->delayed_pic[i] || h->delayed_pic[0]->key_frame;
+ cross_idr = !!h->delayed_pic[i] || h->delayed_pic[0]->key_frame;
out_of_order = !cross_idr && out->poc < h->outputed_poc;