On Fri, 20 May 2022, Trystan Mata wrote:

From 2bdef1bdb93efa40b7d3fe21270f9f23465bee90 Mon Sep 17 00:00:00 2001
From: Trystan Mata <trystan.m...@tytanium.xyz>
Date: Fri, 20 May 2022 14:26:49 +0200
Subject: [PATCH] avcodec/mfenc: Dynamically load MFPlat.DLL

Allow builds of FFmpeg with MediaFoundation to work under N editions of
Windows which are without MediaFoundation by default.

Signed-off-by: Trystan Mata <trystan.m...@tytanium.xyz>
---
 configure             |  4 +-
 libavcodec/mf_utils.c | 26 +++++++------
 libavcodec/mf_utils.h | 16 ++++++--
 libavcodec/mfenc.c    | 91 ++++++++++++++++++++++++++++++++++++-------
 4 files changed, 107 insertions(+), 30 deletions(-)

This patch on its own breaks builds for UWP targets (where LoadLibrary isn't available). Or more precisely, previously mfenc was enabled, now it no longer is available.

For such targets, one can unconditionally assume that the functions are available and can link directly against them. See ff_MFTEnumEx in mf_utils.c how that's done so far. Doing the same instead of LoadLibrary probably shouldn't be an issue for you, but I think we'd need to drop the dependency on LoadLibrary in configure. (I think that's fine, we don't really lose anything by doing that.)

Btw, when sending updates to an earlier posted patch, it'd be nice if you'd mention somewhere what changed compared to the previous revision of the patch.

// Martin

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to