ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Fri May 2 16:26:04 2025 -0300| [d34c7384351a4aeb271b22a731e109c60356f068] | committer: James Almer
avcodec/hevc/hevcdec: ensure a bit was read when checking for alignment_bit_equal_to_one 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> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d34c7384351a4aeb271b22a731e109c60356f068 --- 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; } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".