From e47793585b669e8c6f4657f9fac8dd4bbfbd6c6d Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 24 Mar 2018 17:53:01 +0100 Subject: [PATCH] Fix an FFmpeg deprecation warning. --- mux.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mux.cpp b/mux.cpp index cfe38b6..5e9043e 100644 --- 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); } -- 2.39.2