From: Steinar H. Gunderson Date: Sat, 24 Mar 2018 16:53:01 +0000 (+0100) Subject: Fix an FFmpeg deprecation warning. X-Git-Tag: 1.7.1~2 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e47793585b669e8c6f4657f9fac8dd4bbfbd6c6d;p=nageru Fix an FFmpeg deprecation warning. --- 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); }