1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avfilter/trim: drop all audio frames instead of asserting

This commit is contained in:
Paul B Mahol 2019-09-30 12:57:26 +02:00
parent a6e2cf5eb0
commit 8b36968ef4

View File

@ -300,7 +300,8 @@ static int atrim_filter_frame(AVFilterLink *inlink, AVFrame *frame)
s->nb_samples += frame->nb_samples;
start_sample = FFMAX(0, start_sample);
end_sample = FFMIN(frame->nb_samples, end_sample);
av_assert0(start_sample < end_sample || (start_sample == end_sample && !frame->nb_samples));
if (start_sample >= end_sample || !frame->nb_samples)
goto drop;
if (start_sample) {
AVFrame *out = ff_get_audio_buffer(ctx->outputs[0], end_sample - start_sample);