Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 770201 Details for
Bug 834421
net-im/telegram-desktop-3.5.2-r1 with ffmpeg-5.0: SourceFiles/ffmpeg/ffmpeg_utility.cpp:160:17: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ffmpeg-v5.0.patch
FFmepeg-v5.0.patch (text/plain), 4.69 KB, created by
Joe Kappus
on 2022-04-12 06:33:16 UTC
(
hide
)
Description:
ffmpeg-v5.0.patch
Filename:
MIME Type:
Creator:
Joe Kappus
Created:
2022-04-12 06:33:16 UTC
Size:
4.69 KB
patch
obsolete
>Description: Make build against FFmegep v5.0 >Forwarded: https://github.com/telegramdesktop/tdesktop/pull/24044 >Bug-Debian: https://bugs.debian.org/1004767 >Author: Nicholas Guriev <guriev-ns@ya.ru> >Last-Update: Wed, 09 Feb 2022 00:13:06 +0300 > >--- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp >+++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp >@@ -154,7 +154,7 @@ void FormatDeleter::operator()(AVFormatC > } > } > >-AVCodec *FindDecoder(not_null<AVCodecContext*> context) { >+const AVCodec *FindDecoder(not_null<AVCodecContext*> context) { > // Force libvpx-vp9, because we need alpha channel support. > return (context->codec_id == AV_CODEC_ID_VP9) > ? avcodec_find_decoder_by_name("libvpx-vp9") >--- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.h >+++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.h >@@ -158,7 +158,7 @@ using SwscalePointer = std::unique_ptr<S > void LogError(QLatin1String method); > void LogError(QLatin1String method, FFmpeg::AvErrorWrap error); > >-[[nodiscard]] AVCodec *FindDecoder(not_null<AVCodecContext*> context); >+[[nodiscard]] const AVCodec *FindDecoder(not_null<AVCodecContext*> context); > [[nodiscard]] crl::time PtsToTime(int64_t pts, AVRational timeBase); > // Used for full duration conversion. > [[nodiscard]] crl::time PtsToTimeCeil(int64_t pts, AVRational timeBase); >--- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp >+++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp >@@ -147,7 +147,7 @@ struct Instance::Inner::Private { > AVIOContext *ioContext = nullptr; > AVFormatContext *fmtContext = nullptr; > AVStream *stream = nullptr; >- AVCodec *codec = nullptr; >+ const AVCodec *codec = nullptr; > AVCodecContext *codecContext = nullptr; > bool opened = false; > bool processing = false; >--- a/Telegram/SourceFiles/media/audio/media_audio_ffmpeg_loader.h >+++ b/Telegram/SourceFiles/media/audio/media_audio_ffmpeg_loader.h >@@ -60,6 +60,9 @@ protected: > uchar *ioBuffer = nullptr; > AVIOContext *ioContext = nullptr; > AVFormatContext *fmtContext = nullptr; >+#if LIBAVFORMAT_VERSION_MAJOR >= 59 >+ const >+#endif > AVCodec *codec = nullptr; > int32 streamId = 0; > >--- a/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp >+++ b/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp >@@ -23,8 +23,8 @@ constexpr auto kMaxQueuedPackets = 1024; > not_null<AVStream*> stream, > Mode mode) { > return (mode == Mode::Video || mode == Mode::Inspection) >- && stream->codec >- && (stream->codec->codec_id == AV_CODEC_ID_VP9) >+ && stream->codecpar >+ && (stream->codecpar->codec_id == AV_CODEC_ID_VP9) > && format->iformat > && format->iformat->name > && QString::fromLatin1( >--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPart.cpp >+++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPart.cpp >@@ -170,6 +170,9 @@ public: > > _frame = av_frame_alloc(); > >+#if LIBAVFORMAT_VERSION_MAJOR >= 59 >+ const >+#endif > AVInputFormat *inputFormat = av_find_input_format("ogg"); > if (!inputFormat) { > _didReadToEnd = true; >@@ -209,7 +212,7 @@ public: > audioCodecParameters = inCodecpar; > audioStream = inStream; > >- _durationInMilliseconds = (int)((inStream->duration + inStream->first_dts) * 1000 / 48000); >+ _durationInMilliseconds = (int)(inStream->duration * av_q2d(inStream->time_base) * 1000); > > if (inStream->metadata) { > AVDictionaryEntry *entry = av_dict_get(inStream->metadata, "TG_META", nullptr, 0); >@@ -255,7 +258,7 @@ public: > } > > if (audioCodecParameters && audioStream) { >- AVCodec *codec = avcodec_find_decoder(audioCodecParameters->codec_id); >+ const AVCodec *codec = avcodec_find_decoder(audioCodecParameters->codec_id); > if (codec) { > _codecContext = avcodec_alloc_context3(codec); > ret = avcodec_parameters_to_context(_codecContext, audioCodecParameters); >--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp >+++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp >@@ -337,6 +337,9 @@ public: > > int ret = 0; > >+#if LIBAVFORMAT_VERSION_MAJOR >= 59 >+ const >+#endif > AVInputFormat *inputFormat = av_find_input_format(container.c_str()); > if (!inputFormat) { > _didReadToEnd = true; >@@ -380,7 +383,7 @@ public: > } > > if (videoCodecParameters && videoStream) { >- AVCodec *codec = avcodec_find_decoder(videoCodecParameters->codec_id); >+ const AVCodec *codec = avcodec_find_decoder(videoCodecParameters->codec_id); > if (codec) { > _codecContext = avcodec_alloc_context3(codec); > ret = avcodec_parameters_to_context(_codecContext, videoCodecParameters);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 834421
:
766097
|
766098
| 770201