[FFmpeg-cvslog] avcodec/h264_ps: use get_se_golomb_long() to parse some sps fields

James Almer git at videolan.org
Thu Apr 25 00:36:39 EEST 2019


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Apr 24 18:29:59 2019 -0300| [a42e761b9623f76b36fa227e3eeb34c97c8714dc] | committer: 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: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a42e761b9623f76b36fa227e3eeb34c97c8714dc
---

 libavcodec/h264_ps.c | 6 +++---
 1 file 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;



More information about the ffmpeg-cvslog mailing list