Guard avcodec_register_all() calls

{channels/tsmf/client/ffmpeg/tsmf,libfreerdp/codec/dsp}_ffmpeg.c:
Guard calls to `avcodec_register_all()` against use beyond
`AV_VERSION_INT(58, 10, 100)`, where upstream ffmpeg made it obsolete.
This commit is contained in:
David Runge 2022-01-24 19:47:29 +01:00 committed by akallabeth
parent 2d4850de66
commit d0488f8692
2 changed files with 4 additions and 0 deletions

View File

@ -615,7 +615,9 @@ static void tsmf_ffmpeg_free(ITSMFDecoder* decoder)
static INIT_ONCE g_Initialized = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK InitializeAvCodecs(PINIT_ONCE once, PVOID param, PVOID* context)
{
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)
avcodec_register_all();
#endif
return TRUE;
}

View File

@ -573,7 +573,9 @@ BOOL freerdp_dsp_ffmpeg_supports_format(const AUDIO_FORMAT* format, BOOL encode)
FREERDP_DSP_CONTEXT* freerdp_dsp_ffmpeg_context_new(BOOL encode)
{
FREERDP_DSP_CONTEXT* context;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)
avcodec_register_all();
#endif
context = calloc(1, sizeof(FREERDP_DSP_CONTEXT));
if (!context)