Conversation
fix build with ffmpeg-8
|
Add |
|
The CI has failed with |
|
in my Slackware, build success |
|
The CI has stronger checks. Please read the error, from my reading of the code it's completely justified, the new code is bugged |
|
AVStream now deprecated in ffmpeg 8. |
|
Not sure what you mean? You have to fix the bug you introduced in the new code and the CI points you at. |
|
The following simpler patch seems to work; i.e., at least successfully builds, haven't fully tested the functionality for potential regressions: diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
index 9ccdb15592..f261b7d6dc 100644
--- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
+++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
@@ -683,10 +683,10 @@ int DurationByPacket(const Packet &packet, AVRational timeBase) {
}
int ReadRotationFromMetadata(not_null<AVStream*> stream) {
- const auto displaymatrix = av_stream_get_side_data(
- stream,
- AV_PKT_DATA_DISPLAYMATRIX,
- nullptr);
+ const auto displaymatrix = av_packet_side_data_get(
+ stream->codecpar->coded_side_data,
+ stream->codecpar->nb_coded_side_data,
+ AV_PKT_DATA_DISPLAYMATRIX);
auto theta = 0;
if (displaymatrix) {
theta = -round(av_display_rotation_get((int32_t*)displaymatrix)); |
|
@lfos do you mind opening a new PR so it can run the CI and stuff? |
|
Updates to this PR will trigger the CI immediately. New PR will have to wait until CI run is approved. |
|
The patch from @lfos does fix the FFmpeg 8 API change (AVStream → codecpar->coded_side_data), but u still need a return at the end of that function. |
fix build with ffmpeg-8
Fixes: #29713