History

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.

James Almer committed 1 year ago

Commit d34c7381 parent 62f7b431 file · +1 −1Browse files

Unified · Split

libavcodec/hevc/hevcdec.c+1−1
@@ -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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t