]> git.sesse.net Git - nageru/blobdiff - mux.cpp
Document the mlockall() change in NEWS.
[nageru] / mux.cpp
diff --git a/mux.cpp b/mux.cpp
index aec124b34aea7be5f5c5de7e9ec36a2eb86b0980..184fa1e11d549f33b8be9bceae5895a365cb4c90 100644 (file)
--- a/mux.cpp
+++ b/mux.cpp
@@ -145,7 +145,7 @@ void Mux::add_interleaved_packet(const AVPacket &pkt)
                AVPacket *queued_pkt = waiting_packets.front();
                waiting_packets.pop();
                write_packet_with_signal(*queued_pkt);
-               av_packet_unref(queued_pkt);
+               av_packet_free(&queued_pkt);
        }
 
        if (waiting_packets.empty()) {
@@ -167,6 +167,7 @@ void Mux::write_packet_with_signal(const AVPacket &pkt)
                fprintf(stderr, "av_interleaved_write_frame() failed\n");
                exit(1);
        }
+       avio_flush(avctx->pb);
 }
 
 void Mux::plug()