d2vsource
d2vsource copied to clipboard
Fail to build with ffmpeg 5
Debian unstable amd64 ffmpeg 5.0
src/core/decode.cpp: In function 'decodecontext* decodeinit(d2vcontext*, int, std::string&)':
src/core/decode.cpp:168:11: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'decodecontext' {aka 'struct decodecontext'} with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
168 | memset(ret, 0, sizeof(*ret));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from src/core/decode.cpp:35:
src/core/decode.hpp:33:16: note: 'decodecontext' {aka 'struct decodecontext'} declared here
33 | typedef struct decodecontext {
| ^~~~~~~~~~~~~
src/core/decode.cpp:223:44: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive]
223 | ret->incodec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| const AVCodec*
src/core/decode.cpp:225:44: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive]
225 | ret->incodec = avcodec_find_decoder(AV_CODEC_ID_MPEG2VIDEO);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| const AVCodec*
src/core/decode.cpp:245:17: error: 'AVCodecContext' {aka 'struct AVCodecContext'} has no member named 'refcounted_frames'
245 | ret->avctx->refcounted_frames = 1;
| ^~~~~~~~~~~~~~~~~
src/core/decode.cpp: In function 'int decodeframe(int, d2vcontext*, decodecontext*, AVFrame*, std::string&)':
src/core/decode.cpp:429:23: warning: 'void av_init_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
429 | av_init_packet(&dctx->inpkt);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:316,
from src/core/decode.cpp:28:
/usr/include/x86_64-linux-gnu/libavcodec/packet.h:506:6: note: declared here
506 | void av_init_packet(AVPacket *pkt);
| ^~~~~~~~~~~~~~
src/core/decode.cpp:484:13: error: 'avcodec_decode_video2' was not declared in this scope; did you mean 'avcodec_decode_subtitle2'?
484 | avcodec_decode_video2(dctx->avctx, out, &av_ret, &dctx->inpkt);
| ^~~~~~~~~~~~~~~~~~~~~
| avcodec_decode_subtitle2
src/core/decode.cpp:503:25: error: 'avcodec_decode_video2' was not declared in this scope; did you mean 'avcodec_decode_subtitle2'?
503 | int r = avcodec_decode_video2(dctx->avctx, out, &av_ret, &dctx->inpkt);
| ^~~~~~~~~~~~~~~~~~~~~
| avcodec_decode_subtitle2
make: *** [Makefile:557: src/core/decode.lo] Error 1