summaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_ps.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-05-06 19:09:04 +0200
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-05-07 21:10:59 +0100
commit6eb1b40ad869e011bb83a04c9c03a1001f75bf3f (patch)
tree53913471b16171e60ce9f87df833b53701093595 /libavcodec/hevc_ps.c
parent1bc83f6ea8ff35eae2113e7f21713d298c27ebd1 (diff)
downloadffmpeg-streaming-6eb1b40ad869e011bb83a04c9c03a1001f75bf3f.zip
ffmpeg-streaming-6eb1b40ad869e011bb83a04c9c03a1001f75bf3f.tar.gz
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>
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index ce3f3df..83f2ec2 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -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;
}
OpenPOWER on IntegriCloud