Skip to content

Commit

Permalink
avcodec/hevc_ps: Only discard overread VPS if a previous is available
Browse files Browse the repository at this point in the history
Fixes Ticket4621

Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni authored and fritsch committed Jul 5, 2015
1 parent 28dd9c6 commit 8bf7719
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libavcodec/hevc_ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 8bf7719

Please sign in to comment.