sdcb / Sdcb.FFmpeg

FFmpeg basic .NET API generated by CppSharp
GNU Lesser General Public License v3.0
340 stars 54 forks source link

编译之后 用AUTO 生成代码 会触发一个重复的KEY 问题 #16

Closed zero16832 closed 6 months ago

zero16832 commented 6 months ago

av_image_copy2 这个 会有多个

Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: av_image_copy2 at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value) at Sdcb.FFmpeg.AutoGen.Generator.WriteInlineFunctions(String outputFile) in F:\Sdcb.FFmpeg\src\Sdcb.FFmpeg.AutoGen\Generator.cs:line 150 at Sdcb.FFmpeg.AutoGen.Program.Main(String[] args) in F:\Sdcb.FFmpeg\src\Sdcb.FFmpeg.AutoGen\Program.cs:line 98

sdcb commented 6 months ago

按道理你没必要自行运行AutoGen项目,因为它是根据最新的头文件去创建的

zero16832 commented 6 months ago

我就跑了一下 试试 看看啥效果 ,我看了一下 有可能是这里导致的:/**

/**

zero16832 commented 6 months ago

上面的内容 就是 最新的ffmpeg-release-full-shared.7z 里面的文件的内容

sdcb commented 6 months ago

是的,最新的ffmpeg包可能会随着里面内容的变化导致原本的解析代码失效

zero16832 commented 6 months ago

有空 麻烦 看看?

sdcb commented 6 months ago

fixed in https://github.com/sdcb/Sdcb.FFmpeg/commit/9861d93d943b927d0c7d0a0a70f0aae7814811a2