]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mux.c
avutil/audio_fifo: split into a separate doxy module
[ffmpeg] / libavformat / mux.c
index afdeca1afbbb6493dbbedc894c8dbd4a411520a5..687f7043da529c08147125af3a4425318b99190b 100644 (file)
@@ -632,7 +632,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
     if (!pkt) {
         if (s->oformat->flags & AVFMT_ALLOW_FLUSH) {
             ret = s->oformat->write_packet(s, NULL);
-            if (s->flush_packets && s->pb && s->pb->error >= 0)
+            if (s->flush_packets && s->pb && s->pb->error >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS)
                 avio_flush(s->pb);
             if (ret >= 0 && s->pb && s->pb->error < 0)
                 ret = s->pb->error;