From ff2df4056cff29ac8b20b9b6a7533347d5d9f0bd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 7 Jun 2016 03:48:09 +0200 Subject: [PATCH] avcodec/utils: check skip_samples signedness Fixes Ticket5528 Signed-off-by: Michael Niedermayer (cherry picked from commit 153ab83bd37cbbcc79d8303cc6efbf81089b8123) Conflicts: libavcodec/utils.c --- libavcodec/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index fc03e4901d..528c13be0f 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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;