Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

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 Anton Fedchin committed Jul 6, 2015
1 parent 28dd9c6 commit f7077f7
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 f7077f7

Please sign in to comment.