Backport of "h265parser: Fix possible overflow using max_sub_layers_minus1" into 1.22
Backport of !5364 (merged) "h265parser: Fix possible overflow using max_sub_layers_minus1".
Commits:
- 963f7b80 h265parser: Fix possible overflow using max_sub_layers_minus1