avcodec/utils: check skip_samples signedness

Fixes Ticket5528

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 153ab83bd3)

Conflicts:

	libavcodec/utils.c
This commit is contained in:
Michael Niedermayer 2016-06-07 03:48:09 +02:00
parent df12a24235
commit ff2df4056c
1 changed files with 1 additions and 1 deletions

View File

@ -2467,7 +2467,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
avctx->internal->skip_samples);
discard_padding = AV_RL32(side + 4);
}
if (avctx->internal->skip_samples && *got_frame_ptr) {
if (avctx->internal->skip_samples > 0 && *got_frame_ptr) {
if(frame->nb_samples <= avctx->internal->skip_samples){
*got_frame_ptr = 0;
avctx->internal->skip_samples -= frame->nb_samples;