From 6919e54c00b750cd3d9d756258d3677df52f96a9 Mon Sep 17 00:00:00 2001 From: Art Clarke Date: Fri, 20 Jun 2008 07:27:44 +0000 Subject: [PATCH] Check if there is at least a stream before writing trailer. Patch by Art Clarke: aclarke vlideshow com Originally committed as revision 13836 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 0f02ccf87b..e8cd86bcbc 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2551,7 +2551,7 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pk pktl= pktl->next; } - if(s->nb_streams == stream_count || (flush && stream_count)){ + if(stream_count && (s->nb_streams == stream_count || flush)){ pktl= s->packet_buffer; *out= pktl->pkt;