fix: Use version-agnostic library names for FFmpeg DLLs on Windows - #757
fix: Use version-agnostic library names for FFmpeg DLLs on Windows#757kt286 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kt286 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @kt286. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideOn Windows, the PR removes hardcoded FFmpeg DLL version suffixes and switches to version-agnostic library base names so that existing wildcard-based libPath resolution can automatically locate the latest installed FFmpeg DLLs at runtime. Sequence diagram for Windows FFmpeg DLL loading with version-agnostic namessequenceDiagram
participant Application
participant dynamiclibraries
participant libPath
participant WindowsLoader
participant FFmpeg_avcodec_DLL
Application->>dynamiclibraries: loadFFmpegLibraries()
dynamiclibraries->>libPath: resolveLibraryPath(libavcodecStr)
Note over dynamiclibraries,libPath: libavcodecStr is now "avcodec" (no version suffix)
libPath->>WindowsLoader: searchDLL("avcodec*.dll")
WindowsLoader-->>libPath: matched path to latest avcodec DLL
libPath-->>dynamiclibraries: return resolved DLL path
dynamiclibraries->>WindowsLoader: loadLibrary(resolved path)
WindowsLoader-->>dynamiclibraries: handle to FFmpeg_avcodec_DLL
dynamiclibraries-->>Application: FFmpeg ready with latest available version
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/libdmusic/core/dynamiclibraries.cpp" line_range="19" />
<code_context>
-static const QString libavutilStr = "avutil-60";
-static const QString libswresampleStr = "swresample-6";
+static const QString libavcodecStr = "avcodec";
+static const QString libavformateStr = "avformat";
+static const QString libavutilStr = "avutil";
+static const QString libswresampleStr = "swresample";
</code_context>
<issue_to_address>
**nitpick (typo):** The identifier `libavformateStr` appears to have a typo in its name which reduces readability.
Renaming `libavformateStr` to `libavformatStr` would better reflect the referenced library and improve code readability.
Suggested implementation:
```cpp
static const QString libavcodecStr = "avcodec";
static const QString libavformatStr = "avformat";
static const QString libavutilStr = "avutil";
```
Any other occurrences of `libavformateStr` in this file (or related source files) should be renamed to `libavformatStr` to keep usage consistent and avoid build errors. Search the codebase for `libavformateStr` and update references accordingly.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
db085eb to
77b9825
Compare
|
TAG Bot New tag: 7.0.63 |
|
TAG Bot New tag: 7.0.64 |
77b9825 to
8b164f4
Compare
|
TAG Bot New tag: 7.0.65 |
|
TAG Bot New tag: 7.0.66 |
Remove hardcoded version suffixes (e.g. avcodec-63) from FFmpeg library names so that libPath's wildcard matching can automatically resolve the latest available version at runtime. fix: Windows 下使用无版本号的 FFmpeg 库名以实现动态适配 移除 FFmpeg 库名中硬编码的版本号后缀(如 avcodec-63),使 libPath 的通配 符匹配机制能够自动解析运行时可用的最新版本,避免因 FFmpeg 版本更替导致 库加载失败。
8b164f4 to
f156ca5
Compare
Remove hardcoded version suffixes (e.g. avcodec-63) from FFmpeg library names so that libPath's wildcard matching can automatically resolve the latest available version at runtime.
fix: Windows 下使用无版本号的 FFmpeg 库名以实现动态适配
移除 FFmpeg 库名中硬编码的版本号后缀(如 avcodec-63),使 libPath 的通配 符匹配机制能够自动解析运行时可用的最新版本,避免因 FFmpeg 版本更替导致库加载失败。
Summary by Sourcery
Bug Fixes: