]> git.sesse.net Git - nageru/commitdiff
Fix an FFmpeg deprecation warning.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 24 Mar 2018 16:53:01 +0000 (17:53 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 24 Mar 2018 16:53:01 +0000 (17:53 +0100)
mux.cpp

diff --git a/mux.cpp b/mux.cpp
index cfe38b63a67041eb2a6f0f3b7cb0b1cec945f490..5e9043e78906989031e3c8bb30d0077ace184b54 100644 (file)
--- a/mux.cpp
+++ b/mux.cpp
@@ -148,7 +148,8 @@ Mux::~Mux()
 void Mux::add_packet(const AVPacket &pkt, int64_t pts, int64_t dts, AVRational timebase)
 {
        AVPacket pkt_copy;
-       if (av_copy_packet(&pkt_copy, &pkt) < 0) {
+       av_init_packet(&pkt_copy);
+       if (av_packet_ref(&pkt_copy, &pkt) < 0) {
                fprintf(stderr, "av_copy_packet() failed\n");
                exit(1);
        }