pjproject
pjproject copied to clipboard
Support ffmpeg 5.1
FFMPEG 5.1 has some changes which will break current build. The changes mostly related to removing some APIs that were already deprecated:
-
AVCodec::encode2()/decode()
removed here. -
av_codec_next()/avcodec_register_all()
removed here -
avcodec_encode_video2()/avcodec_decode_video2()
removed here
This ticket will fix the issue by using the updated method. Tested using FFMPEG 4.2 and FFMPEG 5.1
It should be positive, but printing the value to log. It prints -11
.
However, the check AVERROR(EAGAIN) for encoding should already be correct.
It breaks the loop when there's no other output. If there's no check, the encoding will be detected as error.
As for AVERROR_EOF check, I'm going to leave it.