hevc: Use uint64 to check for tile dimensions

And use unsigned datatypes.

Otherwise it would overflow.

Sample-Id: 00001315-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
This commit is contained in:
Luca Barbato 2014-01-11 03:20:45 +01:00
parent d5c15ebeaf
commit b37e796082
2 changed files with 5 additions and 5 deletions

View File

@ -513,10 +513,10 @@ typedef struct HEVCPPS {
uint8_t slice_header_extension_present_flag;
// Inferred parameters
int *column_width; ///< ColumnWidth
int *row_height; ///< RowHeight
int *col_bd; ///< ColBd
int *row_bd; ///< RowBd
unsigned int *column_width; ///< ColumnWidth
unsigned int *row_height; ///< RowHeight
unsigned int *col_bd; ///< ColBd
unsigned int *row_bd; ///< RowBd
int *col_idxX;
int *ctb_addr_rs_to_ts; ///< CtbAddrRSToTS

View File

@ -1106,7 +1106,7 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
pps->uniform_spacing_flag = get_bits1(gb);
if (!pps->uniform_spacing_flag) {
int sum = 0;
uint64_t sum = 0;
for (i = 0; i < pps->num_tile_columns - 1; i++) {
pps->column_width[i] = get_ue_golomb_long(gb) + 1;
sum += pps->column_width[i];