summaryrefslogtreecommitdiff
path: root/mozilla-1619543.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mozilla-1619543.patch')
-rw-r--r--mozilla-1619543.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/mozilla-1619543.patch b/mozilla-1619543.patch
new file mode 100644
index 0000000..7dc1e86
--- /dev/null
+++ b/mozilla-1619543.patch
@@ -0,0 +1,97 @@
+diff --git a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
+@@ -101,17 +101,22 @@
+ : LinkResult::UnknownFutureLibAVVersion;
+ }
+
+-#define AV_FUNC_OPTION(func, ver) \
++#define AV_FUNC_OPTION_SILENT(func, ver) \
+ if ((ver)&version) { \
+ if (!(func = (decltype(func))PR_FindSymbol( \
+ ((ver)&AV_FUNC_AVUTIL_MASK) ? mAVUtilLib : mAVCodecLib, \
+ #func))) { \
+- FFMPEG_LOG("Couldn't load function " #func); \
+ } \
+ } else { \
+ func = (decltype(func)) nullptr; \
+ }
+
++#define AV_FUNC_OPTION(func, ver) \
++ AV_FUNC_OPTION_SILENT(func, ver) \
++ if ((ver)&version && (func) == (decltype(func)) nullptr) { \
++ FFMPEG_LOG("Couldn't load function " #func); \
++ }
++
+ #define AV_FUNC(func, ver) \
+ AV_FUNC_OPTION(func, ver) \
+ if ((ver)&version && !func) { \
+@@ -153,30 +158,29 @@
+ AV_FUNC_OPTION(av_frame_get_colorspace, AV_FUNC_AVUTIL_ALL)
+ AV_FUNC_OPTION(av_frame_get_color_range, AV_FUNC_AVUTIL_ALL)
+ #ifdef MOZ_WAYLAND
+- AV_FUNC_OPTION(avcodec_get_hw_config, AV_FUNC_58)
+- AV_FUNC_OPTION(av_hwdevice_ctx_create, AV_FUNC_58)
+- AV_FUNC_OPTION(av_buffer_ref, AV_FUNC_AVUTIL_58)
+- AV_FUNC_OPTION(av_buffer_unref, AV_FUNC_AVUTIL_58)
+- AV_FUNC_OPTION(av_hwframe_transfer_get_formats, AV_FUNC_58)
+- AV_FUNC_OPTION(av_hwdevice_ctx_create_derived, AV_FUNC_58)
+- AV_FUNC_OPTION(av_hwframe_ctx_alloc, AV_FUNC_58)
+- AV_FUNC_OPTION(av_dict_set, AV_FUNC_58)
+- AV_FUNC_OPTION(av_dict_free, AV_FUNC_58)
++ AV_FUNC_OPTION_SILENT(avcodec_get_hw_config, AV_FUNC_58)
++ AV_FUNC_OPTION_SILENT(av_hwdevice_ctx_create, AV_FUNC_58)
++ AV_FUNC_OPTION_SILENT(av_buffer_ref, AV_FUNC_AVUTIL_58)
++ AV_FUNC_OPTION_SILENT(av_buffer_unref, AV_FUNC_AVUTIL_58)
++ AV_FUNC_OPTION_SILENT(av_hwframe_transfer_get_formats, AV_FUNC_58)
++ AV_FUNC_OPTION_SILENT(av_hwdevice_ctx_create_derived, AV_FUNC_58)
++ AV_FUNC_OPTION_SILENT(av_hwframe_ctx_alloc, AV_FUNC_58)
++ AV_FUNC_OPTION_SILENT(av_dict_set, AV_FUNC_58)
++ AV_FUNC_OPTION_SILENT(av_dict_free, AV_FUNC_58)
+ #endif
+ #undef AV_FUNC
+ #undef AV_FUNC_OPTION
+
+ #ifdef MOZ_WAYLAND
+-# define VA_FUNC_OPTION(func) \
++# define VA_FUNC_OPTION_SILENT(func) \
+ if (!(func = (decltype(func))PR_FindSymbol(mVALib, #func))) { \
+- FFMPEG_LOG("Couldn't load function " #func); \
+ func = (decltype(func)) nullptr; \
+ }
+
+ // mVALib is optional and may not be present.
+ if (mVALib) {
+- VA_FUNC_OPTION(vaExportSurfaceHandle)
+- VA_FUNC_OPTION(vaSyncSurface)
++ VA_FUNC_OPTION_SILENT(vaExportSurfaceHandle)
++ VA_FUNC_OPTION_SILENT(vaSyncSurface)
+ }
+ # undef VA_FUNC_OPTION
+ #endif
+diff --git a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+@@ -66,6 +66,9 @@
+ PR_UnloadLibrary(sLibAV.mVALib);
+ sLibAV.mVALib = nullptr;
+ }
++ if (!sLibAV.mVALib) {
++ FFMPEG_LOG("VA-API support: Missing or old %s library.\n", lib);
++ }
+ }
+ #endif
+
+diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+@@ -173,7 +173,7 @@
+ FFMPEG_LOG("Initialising VA-API FFmpeg decoder");
+
+ if (!mLib->IsVAAPIAvailable()) {
+- FFMPEG_LOG("libva library is missing");
++ FFMPEG_LOG("libva library or symbols are missing.");
+ return NS_ERROR_NOT_AVAILABLE;
+ }
+
+
bgstack15