aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-09 11:51:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-09 11:54:40 +0200
commitc9837613ed05bb0c50c756d8cbe0f44b581efdd8 (patch)
tree849ba801bdab6a80f6f2e0c61f2ac963db50029d /libavfilter
parent190a5893d189cc5efbb41069901c1066e58910c9 (diff)
downloadffmpeg-c9837613ed05bb0c50c756d8cbe0f44b581efdd8.tar.gz
avfilter/trim: Fix assertion failure with empty frames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/trim.c2
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);