mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc/utils.c: Make sure skip_samples never goes negative.
Signed-off-by: Sasi Inguva <isasi@google.com> Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c8dc11bb9e
commit
18108f3618
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user