]> git.sesse.net Git - nageru/blobdiff - shared/mux.cpp
Stop using av_init_packet().
[nageru] / shared / mux.cpp
index 46f727c8a1636c9cb2869aa862e3d88e34a23c1f..b8feacd6907460cedb017a07626c64dca5ed10a7 100644 (file)
@@ -157,7 +157,6 @@ void Mux::add_packet(const AVPacket &pkt, int64_t pts, int64_t dts, AVRational t
        assert(pts >= dts);
 
        AVPacket pkt_copy;
-       av_init_packet(&pkt_copy);
        if (av_packet_ref(&pkt_copy, &pkt) < 0) {
                fprintf(stderr, "av_copy_packet() failed\n");
                abort();
@@ -294,6 +293,7 @@ void Mux::write_header()
        // Make sure the header is written before the constructor exits
        // (assuming we are in WRITE_FOREGROUND mode).
        avio_flush(avctx->pb);
+
 }
 
 void MuxMetrics::init(const vector<pair<string, string>> &labels)