Prevents printing bogus errors about the value being 0, when in fact we overread the available slice buffer.
Unified · Split
| @@ -1154,7 +1154,7 @@ static int hls_slice_header(SliceHeader *sh, const HEVCContext *s, GetBitContext · 1153 unmodified lines | |||
| 1154 | } | 1154 | } |
| 1155 | 1155 | ||
| 1156 | ret = get_bits1(gb); | 1156 | ret = get_bits1(gb); |
| 1157 | if (!ret) { | 1157 | if (!ret && get_bits_left(gb) >= 0) { |
| 1158 | av_log(s->avctx, AV_LOG_ERROR, "alignment_bit_equal_to_one=0\n"); | 1158 | av_log(s->avctx, AV_LOG_ERROR, "alignment_bit_equal_to_one=0\n"); |
| 1159 | return AVERROR_INVALIDDATA; | 1159 | return AVERROR_INVALIDDATA; |
| 1160 | } | 1160 | } |