avcodec/utils: check skip_samples signedness
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 7 Jun 2016 01:48:09 +0000 (03:48 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 15 Aug 2016 16:54:34 +0000 (18:54 +0200)
Fixes Ticket5528

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/utils.c

index 892ddb9..cc28732 100644 (file)
@@ -2629,7 +2629,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
             skip_reason = AV_RL8(side + 8);
             discard_reason = AV_RL8(side + 9);
         }
-        if (avctx->internal->skip_samples && *got_frame_ptr &&
+        if (avctx->internal->skip_samples > 0 && *got_frame_ptr &&
             !(avctx->flags2 & AV_CODEC_FLAG2_SKIP_MANUAL)) {
             if(frame->nb_samples <= avctx->internal->skip_samples){
                 *got_frame_ptr = 0;