Commit a42e761b authored by James Almer's avatar James Almer

avcodec/h264_ps: use get_se_golomb_long() to parse some sps fields

All three may be up to 32 bits wide.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 53cc3338
......@@ -449,8 +449,8 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
sps->log2_max_poc_lsb = t + 4;
} else if (sps->poc_type == 1) { // FIXME #define
sps->delta_pic_order_always_zero_flag = get_bits1(gb);
sps->offset_for_non_ref_pic = get_se_golomb(gb);
sps->offset_for_top_to_bottom_field = get_se_golomb(gb);
sps->offset_for_non_ref_pic = get_se_golomb_long(gb);
sps->offset_for_top_to_bottom_field = get_se_golomb_long(gb);
sps->poc_cycle_length = get_ue_golomb(gb);
if ((unsigned)sps->poc_cycle_length >=
......@@ -461,7 +461,7 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
}
for (i = 0; i < sps->poc_cycle_length; i++)
sps->offset_for_ref_frame[i] = get_se_golomb(gb);
sps->offset_for_ref_frame[i] = get_se_golomb_long(gb);
} else if (sps->poc_type != 2) {
av_log(avctx, AV_LOG_ERROR, "illegal POC type %d\n", sps->poc_type);
goto fail;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment