untrunc
untrunc copied to clipboard
Doesn't build with FFmpeg 6
Looks like they finally removed some previously deprecated API.
g++ -MMD -MP -DUNTR_VERSION=\"v308-d72ec32\" -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/untrunc-anthwlock-cli-git/src=/usr/src/debug/untrunc-anthwlock-cli-git -flto=auto -std=c++11 -D_FILE_OFFSET_BITS=64 -g -o .build_shared/src/atom.o -c src/atom.cpp
g++ -MMD -MP -DUNTR_VERSION=\"v308-d72ec32\" -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/untrunc-anthwlock-cli-git/src=/usr/src/debug/untrunc-anthwlock-cli-git -flto=auto -std=c++11 -D_FILE_OFFSET_BITS=64 -g -o .build_shared/src/codec.o -c src/codec.cpp
src/codec.cpp: In function ‘int untr_decode_audio4(AVCodecContext*, AVFrame*, int*, AVPacket*, uint)’:
src/codec.cpp:341:24: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘untr_decode_audio4’?
341 | int consumed = avcodec_decode_audio4(avctx, frame, got_frame, pkt);
| ^~~~~~~~~~~~~~~~~~~~~
| untr_decode_audio4
src/codec.cpp: In function ‘int untr_decode_video2(AVCodecContext*, AVFrame*, int*, AVPacket*)’:
src/codec.cpp:366:16: error: ‘avcodec_decode_video2’ was not declared in this scope; did you mean ‘untr_decode_video2’?
366 | return avcodec_decode_video2(avctx, frame, got_frame, pkt);
| ^~~~~~~~~~~~~~~~~~~~~
| untr_decode_video2
src/codec.cpp: In lambda function:
src/codec.cpp:389:73: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
389 | self->was_bad_ = (!got_frame || self->av_codec_params_->channels != frame->channels);
| ^~~~~~~~
In file included from /usr/include/libavcodec/avcodec.h:42,
from src/codec.cpp:9:
/usr/include/libavcodec/codec_par.h:173:14: note: declared here
173 | int channels;
| ^~~~~~~~
src/codec.cpp:389:73: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
389 | self->was_bad_ = (!got_frame || self->av_codec_params_->channels != frame->channels);
| ^~~~~~~~
/usr/include/libavcodec/codec_par.h:173:14: note: declared here
173 | int channels;
| ^~~~~~~~
src/codec.cpp:389:73: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
389 | self->was_bad_ = (!got_frame || self->av_codec_params_->channels != frame->channels);
| ^~~~~~~~
/usr/include/libavcodec/codec_par.h:173:14: note: declared here
173 | int channels;
| ^~~~~~~~
src/codec.cpp:389:92: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
389 | self->was_bad_ = (!got_frame || self->av_codec_params_->channels != frame->channels);
| ^~~~~~~~
In file included from /usr/include/libavcodec/avcodec.h:35:
/usr/include/libavutil/frame.h:662:9: note: declared here
662 | int channels;
| ^~~~~~~~
src/codec.cpp:389:92: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
389 | self->was_bad_ = (!got_frame || self->av_codec_params_->channels != frame->channels);
| ^~~~~~~~
/usr/include/libavutil/frame.h:662:9: note: declared here
662 | int channels;
| ^~~~~~~~
src/codec.cpp:389:92: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
389 | self->was_bad_ = (!got_frame || self->av_codec_params_->channels != frame->channels);
| ^~~~~~~~
/usr/include/libavutil/frame.h:662:9: note: declared here
662 | int channels;
| ^~~~~~~~
src/codec.cpp:392:71: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
392 | logg(V, "channels: ", self->av_codec_params_->channels, ", ", frame->channels, '\n');
| ^~~~~~~~
/usr/include/libavcodec/codec_par.h:173:14: note: declared here
173 | int channels;
| ^~~~~~~~
src/codec.cpp:392:71: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
392 | logg(V, "channels: ", self->av_codec_params_->channels, ", ", frame->channels, '\n');
| ^~~~~~~~
/usr/include/libavcodec/codec_par.h:173:14: note: declared here
173 | int channels;
| ^~~~~~~~
src/codec.cpp:392:71: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
392 | logg(V, "channels: ", self->av_codec_params_->channels, ", ", frame->channels, '\n');
| ^~~~~~~~
/usr/include/libavcodec/codec_par.h:173:14: note: declared here
173 | int channels;
| ^~~~~~~~
src/codec.cpp:392:94: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
392 | logg(V, "channels: ", self->av_codec_params_->channels, ", ", frame->channels, '\n');
| ^~~~~~~~
/usr/include/libavutil/frame.h:662:9: note: declared here
662 | int channels;
| ^~~~~~~~
src/codec.cpp:392:94: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
392 | logg(V, "channels: ", self->av_codec_params_->channels, ", ", frame->channels, '\n');
| ^~~~~~~~
/usr/include/libavutil/frame.h:662:9: note: declared here
662 | int channels;
| ^~~~~~~~
src/codec.cpp:392:94: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
392 | logg(V, "channels: ", self->av_codec_params_->channels, ", ", frame->channels, '\n');
| ^~~~~~~~
/usr/include/libavutil/frame.h:662:9: note: declared here
662 | int channels;
| ^~~~~~~~
make: *** [Makefile:150: .build_shared/src/codec.o] Error 1
Someone made a preliminary fix over here: https://github.com/oneineight/untrunc/commit/acdc7cae8bd02bc32bed7c11934922b43cc76c57, but I cannot really assess how final that is.
I'm experiencing the same thing
I'm experiencing the same thing I tried ffmpeg 4.4, 5.2, 7.0, but none of them were better versions than 3.4.