diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2014-07-12 18:38:13 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-13 13:26:19 +0200 |
commit | ebd1c505d22ad96e044880755ed9f4cf7cab4f78 (patch) | |
tree | 400c0ef37d1b94db3e0da5c59187f2809f45b454 | |
parent | 1e3f77b53a803a6c63fa64829f1be557b8226288 (diff) | |
download | ffmpeg-ebd1c505d22ad96e044880755ed9f4cf7cab4f78.tar.gz |
h264: fix direct temporal mvs for bottom-field-first poc order.
Fixes http://forum.doom9.org/showthread.php?t=170867.
Fixes: corrupt-1677.mkv
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264_direct.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index 3cc5f85715..b83a279bc0 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -48,7 +48,9 @@ static int get_scale_factor(H264Context * const h, int poc, int poc1, int i){ } void ff_h264_direct_dist_scale_factor(H264Context * const h){ - const int poc = h->cur_pic_ptr->field_poc[h->picture_structure == PICT_BOTTOM_FIELD]; + const int poc = h->picture_structure == PICT_FRAME ? + h->cur_pic_ptr->poc : + h->cur_pic_ptr->field_poc[h->picture_structure == PICT_BOTTOM_FIELD]; const int poc1 = h->ref_list[1][0].poc; int i, field; |