mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 07:59:27 +02:00
Avoid bit-shifting of -1 value
This commit is contained in:
parent
c40b254626
commit
0a035b0ffc
@ -227,7 +227,7 @@ ExportFFmpeg::ExportFFmpeg()
|
||||
SetDescription(ExportFFmpegOptions::fmts[newfmt].Description(), fmtindex);
|
||||
|
||||
int canmeta = ExportFFmpegOptions::fmts[newfmt].canmetadata;
|
||||
if (canmeta && (canmeta == AV_VERSION_INT(-1,-1,-1) || canmeta <= avfver))
|
||||
if (canmeta && (canmeta == AV_CANMETA || canmeta <= avfver))
|
||||
{
|
||||
SetCanMetaData(true,fmtindex);
|
||||
}
|
||||
|
@ -1218,11 +1218,11 @@ static wxString iAACProfileNames(int index)
|
||||
/// List of export types
|
||||
ExposedFormat ExportFFmpegOptions::fmts[] =
|
||||
{
|
||||
{FMT_M4A, wxT("M4A"), wxT("m4a"), wxT("ipod"), 48, AV_VERSION_INT(-1,-1,-1), true, XO("M4A (AAC) Files (FFmpeg)"), AV_CODEC_ID_AAC, true},
|
||||
{FMT_M4A, wxT("M4A"), wxT("m4a"), wxT("ipod"), 48, AV_CANMETA, true, XO("M4A (AAC) Files (FFmpeg)"), AV_CODEC_ID_AAC, true},
|
||||
{FMT_AC3, wxT("AC3"), wxT("ac3"), wxT("ac3"), 7, AV_VERSION_INT(0,0,0), false, XO("AC3 Files (FFmpeg)"), AV_CODEC_ID_AC3, true},
|
||||
{FMT_AMRNB, wxT("AMRNB"), wxT("amr"), wxT("amr"), 1, AV_VERSION_INT(0,0,0), false, XO("AMR (narrow band) Files (FFmpeg)"), AV_CODEC_ID_AMR_NB, true},
|
||||
{FMT_WMA2, wxT("WMA"), wxT("wma"), wxT("asf"), 2, AV_VERSION_INT(52,53,0), false, XO("WMA (version 2) Files (FFmpeg)"), AV_CODEC_ID_WMAV2, true},
|
||||
{FMT_OTHER, wxT("FFMPEG"), wxT(""), wxT(""), 255, AV_VERSION_INT(-1,-1,-1), true, XO("Custom FFmpeg Export"), AV_CODEC_ID_NONE, true}
|
||||
{FMT_OTHER, wxT("FFMPEG"), wxT(""), wxT(""), 255, AV_CANMETA, true, XO("Custom FFmpeg Export"), AV_CODEC_ID_NONE, true}
|
||||
};
|
||||
|
||||
wxString ExposedFormat::Description() const
|
||||
|
@ -38,6 +38,8 @@ enum FFmpegExposedFormat
|
||||
FMT_LAST
|
||||
};
|
||||
|
||||
#define AV_CANMETA (AV_VERSION_INT(255, 255, 255))
|
||||
|
||||
/// Describes export type
|
||||
struct ExposedFormat
|
||||
{
|
||||
@ -46,7 +48,7 @@ struct ExposedFormat
|
||||
const wxChar *extension; //!< default extension for this format. More extensions may be added later via AddExtension.
|
||||
const wxChar *shortname; //!< used to guess the format
|
||||
unsigned maxchannels; //!< how many channels this format could handle
|
||||
int canmetadata; //!< !=0 if format supports metadata, -1 any avformat version, otherwise version support added
|
||||
const int canmetadata; //!< !=0 if format supports metadata, AV_CANMETA any avformat version, otherwise version support added
|
||||
bool canutf8; //!< true if format supports metadata in UTF-8, false otherwise
|
||||
const wxChar *description_; //!< format description (will be shown in export dialog) (untranslated!)
|
||||
AVCodecID codecid; //!< codec ID (see libavcodec/avcodec.h)
|
||||
|
Loading…
x
Reference in New Issue
Block a user