[FFmpeg-cvslog] avformat/hevc: Fix parsing errors

Arthur Grant git at videolan.org
Thu Nov 12 04:07:34 CET 2015


ffmpeg | branch: release/2.7 | Arthur Grant <arthur.grant1969 at gmail.com> | Mon Aug 24 12:19:03 2015 +0200| [717c3ebfa46fac9d51dec9e079fdbc9e4652a9ac] | committer: Michael Niedermayer

avformat/hevc: Fix parsing errors

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 781efd07415cdf6f676cca5b22147e5d6be0a4c4)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/hevc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/hevc.c b/libavformat/hevc.c
index 643b715..c3257ff 100644
--- a/libavformat/hevc.c
+++ b/libavformat/hevc.c
@@ -565,7 +565,8 @@ static int hvcc_parse_sps(GetBitContext *gb,
     }
 
     if (get_bits1(gb)) {                               // long_term_ref_pics_present_flag
-        for (i = 0; i < get_ue_golomb_long(gb); i++) { // num_long_term_ref_pics_sps
+        unsigned num_long_term_ref_pics_sps = get_ue_golomb_long(gb);
+        for (i = 0; i < num_long_term_ref_pics_sps; i++) { // num_long_term_ref_pics_sps
             int len = FFMIN(log2_max_pic_order_cnt_lsb_minus4 + 4, 16);
             skip_bits (gb, len); // lt_ref_pic_poc_lsb_sps[i]
             skip_bits1(gb);      // used_by_curr_pic_lt_sps_flag[i]
@@ -616,11 +617,12 @@ static int hvcc_parse_pps(GetBitContext *gb,
     get_se_golomb_long(gb); // pps_cr_qp_offset
 
     /*
+     * pps_slice_chroma_qp_offsets_present_flag u(1)
      * weighted_pred_flag               u(1)
      * weighted_bipred_flag             u(1)
      * transquant_bypass_enabled_flag   u(1)
      */
-    skip_bits(gb, 3);
+    skip_bits(gb, 4);
 
     tiles_enabled_flag               = get_bits1(gb);
     entropy_coding_sync_enabled_flag = get_bits1(gb);



More information about the ffmpeg-cvslog mailing list