X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh264_direct.c;h=3289fe470011a06ee072c8ff888fcd3942512d9a;hb=a80191379bb994e7d8f5484993e39d33e07240f0;hp=4230a1387ab21d93c94ec1e99d16878d6a528052;hpb=c27adb37ef5bf0280d16e8a2c4df29452a290982;p=ffmpeg diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index 4230a1387ab..3289fe47001 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -49,9 +49,8 @@ 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->picture_structure == PICT_FRAME ? - h->cur_pic_ptr->poc : - h->cur_pic_ptr->field_poc[h->picture_structure == PICT_BOTTOM_FIELD]; + const int poc = FIELD_PICTURE(h) ? h->cur_pic_ptr->field_poc[h->picture_structure == PICT_BOTTOM_FIELD] + : h->cur_pic_ptr->poc; const int poc1 = h->ref_list[1][0].poc; int i, field;