From 82700430535f2215eacad7ced492262c96e4ba5d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 1 Apr 2020 17:28:58 +0200 Subject: [PATCH] Revert "decoder/ffmpeg: copy the AVPacket in ffmpeg_send_packet()" This reverts commit eb192137d61b0c62541904351660f9cd63bc90d5. This is no longer necessary because we require FFmpeg 3.1 or newer since MPD 0.21.2. This fixes a deprecation warning because the implicit AVPacket copy constructor copies the deprecated attribute `convergence_duration`. --- src/decoder/plugins/FfmpegDecoderPlugin.cxx | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index 2b55316e7..fa7ae1371 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -297,7 +297,7 @@ FfmpegReceiveFrames(DecoderClient &client, InputStream &is, */ static DecoderCommand ffmpeg_send_packet(DecoderClient &client, InputStream &is, - AVPacket &&packet, + const AVPacket &packet, AVCodecContext &codec_context, const AVStream &stream, AVFrame &frame, @@ -350,24 +350,6 @@ ffmpeg_send_packet(DecoderClient &client, InputStream &is, return cmd; } -static DecoderCommand -ffmpeg_send_packet(DecoderClient &client, InputStream &is, - const AVPacket &packet, - AVCodecContext &codec_context, - const AVStream &stream, - AVFrame &frame, - uint64_t min_frame, size_t pcm_frame_size, - FfmpegBuffer &buffer) -{ - return ffmpeg_send_packet(client, is, - /* copy the AVPacket, because FFmpeg - < 3.0 requires this */ - AVPacket(packet), - codec_context, stream, - frame, min_frame, pcm_frame_size, - buffer); -} - gcc_const static SampleFormat ffmpeg_sample_format(enum AVSampleFormat sample_fmt) noexcept