aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_ps.c
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2013-12-13 20:05:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-14 03:01:22 +0100
commitc6afd0aacc314bbada6021b685e35d79cfa5edcc (patch)
tree01f36807a77f74898c206f66608952f47ee34a38 /libavcodec/hevc_ps.c
parent445c58a8c6be8a188316fcf947466c85a568289f (diff)
downloadffmpeg-c6afd0aacc314bbada6021b685e35d79cfa5edcc.tar.gz
hevc: fix PTL parsing
This was broken in commit 36658c978f5d7df2ce556075946f3a80f7eca753 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 80e7311b99..858b8bf86d 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -220,7 +220,6 @@ static int decode_profile_tier_level(HEVCContext *s, ProfileTierLevel *ptl)
return -1;
if (get_bits(gb, 12) != 0) // XXX_reserved_zero_44bits[32..43]
return -1;
- ptl->level_idc = get_bits(gb, 8);
return 0;
}
@@ -230,6 +229,7 @@ static int parse_ptl(HEVCContext *s, PTL *ptl, int max_num_sub_layers)
HEVCLocalContext *lc = s->HEVClc;
GetBitContext *gb = &lc->gb;
decode_profile_tier_level(s, &ptl->general_PTL);
+ ptl->general_PTL.level_idc = get_bits(gb, 8);
for (i = 0; i < max_num_sub_layers - 1; i++) {
ptl->sub_layer_profile_present_flag[i] = get_bits1(gb);
@@ -239,10 +239,10 @@ static int parse_ptl(HEVCContext *s, PTL *ptl, int max_num_sub_layers)
for (i = max_num_sub_layers - 1; i < 8; i++)
skip_bits(gb, 2); // reserved_zero_2bits[i]
for (i = 0; i < max_num_sub_layers - 1; i++) {
- if (ptl->sub_layer_profile_present_flag[i]) {
+ if (ptl->sub_layer_profile_present_flag[i])
decode_profile_tier_level(s, &ptl->sub_layer_PTL[i]);
+ if (ptl->sub_layer_level_present_flag[i])
ptl->sub_layer_PTL[i].level_idc = get_bits(gb, 8);
- }
}
return 0;
}