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 57078e4d25)
This commit is contained in:
Michael Niedermayer 2015-06-18 18:03:21 +02:00 committed by Carl Eugen Hoyos
parent 57d094e3e3
commit bd28de1b4d
1 changed files with 2 additions and 1 deletions

View File

@ -461,6 +461,7 @@ int ff_hevc_decode_nal_vps(HEVCContext *s)
if (get_bits_left(gb) < 0) { if (get_bits_left(gb) < 0) {
av_log(s->avctx, AV_LOG_ERROR, av_log(s->avctx, AV_LOG_ERROR,
"Overread VPS by %d bits\n", -get_bits_left(gb)); "Overread VPS by %d bits\n", -get_bits_left(gb));
if (s->vps_list[vps_id])
goto err; goto err;
} }