gkv311 / sview

Stereoscopic media player
GNU General Public License v3.0
97 stars 35 forks source link

Any plans for ffmpeg5 support? #106

Closed piv-pav closed 2 years ago

piv-pav commented 2 years ago

Hello, and thanks you for your effort in creating this wonderful application.

I've been using it for many years on Arch building from AUR, however since ffmpeg5 has been released and adopted by multiple Linux distros (Ubuntu 22.04, Fedora 36, Arch, OpenSuSE TW, etc.) compilation process is failing with following error:

In file included from include/StAV/StAVFrame.h:12,
                 from StShared/StAVFrame.cpp:9:
include/StAV/stAV.h:94:61: error: use of enum 'AVLockOp' without previous declaration
    extern "C" int stFFmpegLock(void** theMutexPtrPtr, enum AVLockOp theOperation);

include/StAV/stAV.h: In function 'AVCodecContext* stAV::getCodecCtx(const AVStream*)':
include/StAV/stAV.h:351:27: error: 'const AVStream' {aka 'const struct AVStream'} has no member named 'codec'
         return theStream->codec;

make: *** [<builtin>: StShared/StAVFrame.o] Error 1

I'm not a C developer, but from the quick search it seems like AVStream.codec has been deprecated in ffmpeg 5.

gkv311 commented 2 years ago

I've pushed compilation fixes with some TODOs and some places not tested. image