]> git.sesse.net Git - nageru/commitdiff
Don't check AVFMT_ALLOW_FLUSH
authorMartin Storsjö <martin@martin.st>
Wed, 20 Apr 2016 11:48:33 +0000 (14:48 +0300)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 20 Apr 2016 20:42:26 +0000 (22:42 +0200)
This check is redundant, av_write_frame does a similar check
internally already. The caller is not supposed to need to know/care
about this.

mux.cpp

diff --git a/mux.cpp b/mux.cpp
index d0c17fdfdc89665ab717db0fc182308f07751ae9..161194ed3d98b65364ad1fa3fbb5c0ca508ca678 100644 (file)
--- a/mux.cpp
+++ b/mux.cpp
@@ -105,9 +105,7 @@ void Mux::add_packet(const AVPacket &pkt, int64_t pts, int64_t dts)
 
        if (keyframe_signal_receiver) {
                if (pkt.flags & AV_PKT_FLAG_KEY) {
-                       if (avctx->oformat->flags & AVFMT_ALLOW_FLUSH) {
-                               av_write_frame(avctx, nullptr);
-                       }
+                       av_write_frame(avctx, nullptr);
                        keyframe_signal_receiver->signal_keyframe();
                }
        }