From a72bbd5bd2453acc0139bd9c4394806f0f2b2278 Mon Sep 17 00:00:00 2001 From: Barrett17 Date: Sun, 5 Aug 2018 11:31:40 +0200 Subject: [PATCH] AVFormatWriter: Cleanup GET_CONTEXT_DEFAULTS macro * av_get_context_default(1,2,3) are deprecated. The functions are supposed to "reset" a codec context to a clean state so that it can be opened again. It was used to allow using AVStream.codec as a decoding context That behaviour is now deprecated, so that's why the function is too. * hint: The code is probably still doing something bad in that regard. * Unfortunately the macro removal did end up in the codecparam diff, but was originally intended to be a commit alone I can't rewrite history unfortunately, at least an explanation is given here. In any case the code wasn't used so no functional change, this is mostly educated cleanup. --- src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp b/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp index 8e2d9a9e22..cce3d67d17 100644 --- a/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp +++ b/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp @@ -48,8 +48,6 @@ static const size_t kIOBufferSize = 64 * 1024; // TODO: This could depend on the BMediaFile creation flags, IIRC, // they allow to specify a buffering mode. -#define GET_CONTEXT_DEFAULTS 0 - typedef AVCodecID CodecID; // #pragma mark - AVFormatWriter::StreamCookie