aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-18 18:03:21 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-06-19 11:25:23 +0200
commitbd28de1b4df5022a88ac0df95c241145d4bb3292 (patch)
treeeac6298b191baf7fd1f322f25604f4d77548cafc
parent57d094e3e399c317df082562f57c6369fc60b3f5 (diff)
downloadffmpeg-bd28de1b4df5022a88ac0df95c241145d4bb3292.tar.gz
avcodec/hevc_ps: Only discard overread VPS if a previous is available
Fixes Ticket4621 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 57078e4d255a06246fef27846073f5ffb312b5dc)
-rw-r--r--libavcodec/hevc_ps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 8d80e19692..5f5bad224f 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -461,7 +461,8 @@ int ff_hevc_decode_nal_vps(HEVCContext *s)
if (get_bits_left(gb) < 0) {
av_log(s->avctx, AV_LOG_ERROR,
"Overread VPS by %d bits\n", -get_bits_left(gb));
- goto err;
+ if (s->vps_list[vps_id])
+ goto err;
}
av_buffer_unref(&s->vps_list[vps_id]);