mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avfilter/trim: Fix assertion failure with empty frames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
190a5893d1
commit
c9837613ed
@ -322,7 +322,7 @@ 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);
|
||||
av_assert0(start_sample < end_sample || (start_sample == end_sample && !frame->nb_samples));
|
||||
|
||||
if (start_sample) {
|
||||
AVFrame *out = ff_get_audio_buffer(ctx->outputs[0], end_sample - start_sample);
|
||||
|
Loading…
Reference in New Issue
Block a user