Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
FFmpeg: update layout api for ffmpeg 6.x and ffmpeg 7.
Browse files Browse the repository at this point in the history
After ffmpeg 5.1, it is deprecated, and has been completely removed in ffmpeg 7.

Our current project is using 6.0 headers, modifying it will not have any side effects.

Since lavu 57.24.100(ffmpeg 5.1)
  • Loading branch information
kongfl888 committed Aug 31, 2024
1 parent 2f0b2f9 commit 4edb9a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/citra_qt/dumping/option_set_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static const std::unordered_map<AVOptionType, const char*> TypeNameMap{{
{AV_OPT_TYPE_STRING, QT_TR_NOOP("string")},
{AV_OPT_TYPE_DICT, QT_TR_NOOP("dictionary")},
{AV_OPT_TYPE_VIDEO_RATE, QT_TR_NOOP("video rate")},
{AV_OPT_TYPE_CHANNEL_LAYOUT, QT_TR_NOOP("channel layout")},
{AV_OPT_TYPE_CHLAYOUT, QT_TR_NOOP("channel layout")},
}};

static const std::unordered_map<AVOptionType, const char*> TypeDescriptionMap{{
Expand All @@ -39,7 +39,7 @@ static const std::unordered_map<AVOptionType, const char*> TypeDescriptionMap{{
{AV_OPT_TYPE_DICT,
QT_TR_NOOP("Comma-splitted list of &lt;key>=&lt;value>. Do not put spaces.")},
{AV_OPT_TYPE_VIDEO_RATE, QT_TR_NOOP("&lt;num>/&lt;den>, or preset values like 'pal'.")},
{AV_OPT_TYPE_CHANNEL_LAYOUT, QT_TR_NOOP("Hexadecimal channel layout mask starting with '0x'.")},
{AV_OPT_TYPE_CHLAYOUT, QT_TR_NOOP("Hexadecimal channel layout mask starting with '0x'.")},
}};

/// Get the preset values of an option. returns {display value, real value}
Expand Down
2 changes: 1 addition & 1 deletion src/core/dumping/ffmpeg_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ std::string FormatDefaultValue(const AVOption* option,
case AV_OPT_TYPE_VIDEO_RATE: {
return ToStdString(option->default_val.str);
}
case AV_OPT_TYPE_CHANNEL_LAYOUT: {
case AV_OPT_TYPE_CHLAYOUT: {
return fmt::format("{:#x}", option->default_val.i64);
}
default:
Expand Down

0 comments on commit 4edb9a0

Please sign in to comment.