mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-08 08:55:34 +02:00
hevc: fix size condition in ptl parsing
When only one sublayer is present, no information is coded. Only when at least two are present, all 8 sublayers are written. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
parent
1bc83f6ea8
commit
6eb1b40ad8
@ -280,7 +280,7 @@ static int parse_ptl(GetBitContext *gb, AVCodecContext *avctx,
|
||||
{
|
||||
int i;
|
||||
if (decode_profile_tier_level(gb, avctx, &ptl->general_ptl) < 0 ||
|
||||
get_bits_left(gb) < 8 + 8*2) {
|
||||
get_bits_left(gb) < 8 + (8*2 * (max_num_sub_layers - 1 > 0))) {
|
||||
av_log(avctx, AV_LOG_ERROR, "PTL information too short\n");
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user