Fix build against FFmpeg v5.0
It has been released on January 17th. This patch keeps source compatibility with older versions.
This commit is contained in:
committed by
John Preston
parent
f4f7b5b99c
commit
436622ad7c
@@ -154,7 +154,7 @@ void FormatDeleter::operator()(AVFormatContext *value) {
|
||||
}
|
||||
}
|
||||
|
||||
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")
|
||||
|
||||
@@ -158,7 +158,7 @@ using SwscalePointer = std::unique_ptr<SwsContext, SwscaleDeleter>;
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user