diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-09 11:51:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-09 11:54:40 +0200 |
commit | c9837613ed05bb0c50c756d8cbe0f44b581efdd8 (patch) | |
tree | 849ba801bdab6a80f6f2e0c61f2ac963db50029d | |
parent | 190a5893d189cc5efbb41069901c1066e58910c9 (diff) | |
download | ffmpeg-c9837613ed05bb0c50c756d8cbe0f44b581efdd8.tar.gz |
avfilter/trim: Fix assertion failure with empty frames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/trim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/trim.c b/libavfilter/trim.c index 6fa3c0cf2f..9109e77fea 100644 --- a/libavfilter/trim.c +++ b/libavfilter/trim.c @@ -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); |