avcodec/hevc: Fix typo in num_entry_point_offsets check
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 15 May 2015 20:12:08 +0000 (22:12 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 15 May 2015 21:46:10 +0000 (23:46 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hevc.c

index 199a3b9..e55bc48 100644 (file)
@@ -709,7 +709,7 @@ static int hls_slice_header(HEVCContext *s)
     if (s->pps->tiles_enabled_flag || s->pps->entropy_coding_sync_enabled_flag) {
         unsigned num_entry_point_offsets = get_ue_golomb_long(gb);
         // It would be possible to bound this tighter but this here is simpler
-        if (sh->num_entry_point_offsets > get_bits_left(gb)) {
+        if (num_entry_point_offsets > get_bits_left(gb)) {
             av_log(s->avctx, AV_LOG_ERROR, "num_entry_point_offsets %d is invalid\n", num_entry_point_offsets);
             return AVERROR_INVALIDDATA;
         }