mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
53cc3338f7
commit
a42e761b96
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user