[FFmpeg-cvslog] avfilter/trim: Fix assertion failure with empty frames

Michael Niedermayer git at videolan.org
Fri Aug 9 12:19:12 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug  9 11:51:20 2013 +0200| [c9837613ed05bb0c50c756d8cbe0f44b581efdd8] | committer: Michael Niedermayer

avfilter/trim: Fix assertion failure with empty frames

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9837613ed05bb0c50c756d8cbe0f44b581efdd8
---

 libavfilter/trim.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/trim.c b/libavfilter/trim.c
index 6fa3c0c..9109e77 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);



More information about the ffmpeg-cvslog mailing list