aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-06-07 03:48:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-15 18:54:34 +0200
commit04987035ffca8cacb580002931abfe70df86a996 (patch)
tree49ec37f2f7412924d7c16415dc55efc53983ab71 /libavcodec/utils.c
parenta4484854db89d0807d00bba7bd9e2c61eabb6e1a (diff)
downloadffmpeg-04987035ffca8cacb580002931abfe70df86a996.tar.gz
avcodec/utils: check skip_samples signedness
Fixes Ticket5528 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 153ab83bd37cbbcc79d8303cc6efbf81089b8123) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 892ddb911c..cc28732c01 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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;