Prevents printing bogus errors about the value being 0, when in fact we overread the available slice buffer.
Signed-off-by: James Almer <jamr...@gmail.com> --- libavcodec/hevc/hevcdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index 83acf3511f..df186d6194 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -1154,7 +1154,7 @@ static int hls_slice_header(SliceHeader *sh, const HEVCContext *s, GetBitContext } ret = get_bits1(gb); - if (!ret) { + if (!ret && get_bits_left(gb) >= 0) { av_log(s->avctx, AV_LOG_ERROR, "alignment_bit_equal_to_one=0\n"); return AVERROR_INVALIDDATA; } -- 2.49.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".