Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building against ffmpeg-4.x #28999

Merged
merged 1 commit into from
Feb 24, 2025
Merged

Conversation

jovaska1337
Copy link
Contributor

Tested against ffmpeg 4.4.5 and 6.1.2 though there may be versions in between where this breaks. Fixes #28660.

@CLAassistant
Copy link

CLAassistant commented Feb 24, 2025

CLA assistant check
All committers have signed the CLA.

@@ -576,6 +576,7 @@ SwresamplePointer MakeSwresamplePointer(
if (!result) {
LogError(u"swr_alloc_set_opts"_q);
}
auto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fragile... Wouldn't having AvErrorWrap error; before ifndef block be better?

@@ -44,7 +44,13 @@ constexpr auto kFrameSize = 4096;
return {};
}


#if DA_FFMPEG_NEW_CHANNEL_LAYOUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't correct. This macro is checking for libavutil version to be higher than 57.28.100. av_find_best_stream belongs to libavformat and has changed to the const pointer in 58.79.100 as far as I can see by ffmpeg commit history.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e.

Suggested change
#if DA_FFMPEG_NEW_CHANNEL_LAYOUT
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 79, 100)

@jovaska1337
Copy link
Contributor Author

I have made the changes you suggested.

@ilya-fedin
Copy link
Contributor

Thanks but there's no need to have a separate commit... Can you squash it?

@jovaska1337
Copy link
Contributor Author

Ok, it is now squashed into a single commit.

@ilya-fedin
Copy link
Contributor

Thanks!

@john-preston john-preston merged commit 0d71750 into telegramdesktop:dev Feb 24, 2025
1 check passed
@john-preston
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure with ffmpeg-4.x
4 participants