[FFmpeg-cvslog] avcodec/hevc_ps: Only discard overread VPS if a previous is available

Michael Niedermayer git at videolan.org
Fri Jun 19 11:19:14 CEST 2015


ffmpeg | branch: release/2.5 | Michael Niedermayer <michaelni at gmx.at> | Thu Jun 18 18:03:21 2015 +0200| [2d55d3483b8e6aa81f32bf8f8c1b797cc59e0af6] | committer: Carl Eugen Hoyos

avcodec/hevc_ps: Only discard overread VPS if a previous is available

Fixes Ticket4621

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 57078e4d255a06246fef27846073f5ffb312b5dc)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d55d3483b8e6aa81f32bf8f8c1b797cc59e0af6
---

 libavcodec/hevc_ps.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 8d80e19..5f5bad2 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]);



More information about the ffmpeg-cvslog mailing list