Commit 18108f36 authored by Sasi Inguva's avatar Sasi Inguva Committed by Michael Niedermayer

lavc/utils.c: Make sure skip_samples never goes negative.

Signed-off-by: 's avatarSasi Inguva <isasi@google.com>
Reviewed-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c8dc11bb
......@@ -2391,7 +2391,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
if ((frame->flags & AV_FRAME_FLAG_DISCARD) && *got_frame_ptr &&
!(avctx->flags2 & AV_CODEC_FLAG2_SKIP_MANUAL)) {
avctx->internal->skip_samples -= frame->nb_samples;
avctx->internal->skip_samples = FFMAX(0, avctx->internal->skip_samples - frame->nb_samples);
*got_frame_ptr = 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment