meganz / sdk

MEGA C++ SDK
BSD 2-Clause "Simplified" License
1.33k stars 504 forks source link

Fix build with FFMPEG 5 #2614

Open Vascom opened 2 years ago

Vascom commented 2 years ago

This change allow to build with FFMPEG 5.0.

ChrisLane commented 2 years ago

Have you not found that you need to also remove this line to allow compilation with current builds of ffmpeg?

Vascom commented 2 years ago

What line? I just made this change and compile megasync at rpmfusion with FFMPEG 5.

ChrisLane commented 2 years ago

The line was linked in my comment. https://github.com/meganz/sdk/blob/b7e9a4d32e2dbaffa8831cc7122afe22a30cdb0b/src/gfx/freeimage.cpp#L305

It causes this compile error: https://github.com/meganz/sdk/issues/2576

Vascom commented 2 years ago

May be it need for latest release. I used 3.9.6.b to build megasync 4.6.5.0.

Vascom commented 2 years ago

Agree. Need to remove this line. It was done in other place of my spec-file to build megasync.

sl1pkn07 commented 1 year ago

now, with ffmpeg 6, AV_CODEC_CAP_TRUNCATED is deprecated and removed

https://github.com/FFmpeg/FFmpeg/commit/dd846bc4a9163f875cc2c4e99325c1a7b4ab8e7d

sl1pkn07 commented 1 year ago

patch for ffmpeg6

https://github.com/meganz/sdk/issues/2635#issuecomment-1495405085

drmikecooke commented 3 months ago

Came across this using Bookworm debian which has ffmpeg 5.

commenting out referenced line and converting the the line 316

[code] AVCodec* decoder = avcodec_find_decoder(codecId); [/code]

to

[code] const AVCodec* decoder = avcodec_find_decoder(codecId); [/code]

also seemed to be required.

for it to get past this and move on to other work (not finished yet)