OSDN Git Service

vaapi_h264: Scale log2_max_pic_order_cnt_lsb with max_b_frames
authorMark Thompson <sw@jkqxz.net>
Wed, 4 Jan 2017 23:05:10 +0000 (23:05 +0000)
committerMark Thompson <sw@jkqxz.net>
Wed, 8 Feb 2017 19:14:05 +0000 (19:14 +0000)
commiteefa4b76ee5a1059a36d8bd77b123c2cfbfea604
tree6d5473d781a7d005aa83841576e055c0310c0c25
parentc667c0979cbc2e04d1d00964b82ac49746caa43c
vaapi_h264: Scale log2_max_pic_order_cnt_lsb with max_b_frames

Before this change, it was possible to overflow pic_order_cnt_lsb and
generate a stream with invalid POC numbering.  This makes sure that
the field is large enough that a single IDR B* P sequence uses fewer
than half the available POC lsb values.

(cherry picked from commit 89725a8512721fffd190021ded2d3f5b42e20e2a)
libavcodec/vaapi_encode_h264.c