leandromoreira / ffmpeg-libav-tutorial

FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more. Translations: πŸ‡ΊπŸ‡Έ πŸ‡¨πŸ‡³ πŸ‡°πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡»πŸ‡³ πŸ‡§πŸ‡·
https://github.com/leandromoreira/ffmpeg-libav-tutorial
BSD 3-Clause "New" or "Revised" License
9.78k stars 937 forks source link

There is not function named "av_mallocz_array" in the recent ffmpeg library #126

Open asmwarrior opened 1 year ago

asmwarrior commented 1 year ago

Hi, when I try to run the sample code, I got the build error that the function av_mallocz_array is not defined.

I just looked at the ffmpeg library, and in this file, it said this function is deprecated.

https://github.com/FFmpeg/FFmpeg/blob/41dd50ad0dbbdec2225a6793758d40f0281978d9/doc/APIchanges#L315

2021-09-20 - 8d5de914d31 - lavu 57.6.100 - mem.h Deprecate av_mallocz_array() as it is identical to av_calloc().

So, can you fix your sample code? BTW, I'm using the Package: mingw-w64-x86_64-ffmpeg - MSYS2 Packages, which is version 6.0.3 under Windows + msys2(gcc compiler)

Thanks.