From 44dbfae5b2e3fa45fbd356efd9c57ca23e09b90a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Wed, 20 Apr 2016 14:48:33 +0300 Subject: [PATCH] Don't check AVFMT_ALLOW_FLUSH 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mux.cpp b/mux.cpp index d0c17fd..161194e 100644 --- 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(); } } -- 2.39.2