summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-04-01 17:28:58 +0200
committerMax Kellermann <max@musicpd.org>2020-04-01 17:30:28 +0200
commit82700430535f2215eacad7ced492262c96e4ba5d (patch)
tree17781f0838b9c233b5a1725de49c4a23d4ccb92f
parentc00ce42bca3830672395ea66c9083dc3b2f6fa7b (diff)
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`.
-rw-r--r--src/decoder/plugins/FfmpegDecoderPlugin.cxx20
1 files changed, 1 insertions, 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