aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-04-24 18:29:59 -0300
committerJames Almer <jamrial@gmail.com>2019-04-24 18:34:51 -0300
commita42e761b9623f76b36fa227e3eeb34c97c8714dc (patch)
tree095c3df641d1d402532c9edaa378683bf15910e2 /libavcodec
parent53cc3338f7b24cda40ad8a69e12b37e7335f37ff (diff)
downloadffmpeg-a42e761b9623f76b36fa227e3eeb34c97c8714dc.tar.gz
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264_ps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 17bfa780ce..7c92c68b38 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -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;