avcodec/hevc_ps: Only discard overread VPS if a previous is available
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Jun 2015 16:03:21 +0000 (18:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Jun 2015 16:03:21 +0000 (18:03 +0200)
Fixes Ticket4621

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hevc_ps.c

index ced0600..757f666 100644 (file)
@@ -499,7 +499,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;
     }
 
     if (s->vps_list[vps_id] &&