mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-11 17:05:26 +01:00
FFmpeg: use Codec name instead if codec_id integer to identify codec
This allows selecting the intended codec when there are multiple with the same codec_id Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Benjamin Drung <bdrung@debian.org>
This commit is contained in:
@@ -423,7 +423,9 @@ bool ExportFFmpeg::InitCodecs(AudacityProject *project)
|
||||
set_dict_int(&options, "prediction_order_method", gPrefs->Read(wxT("/FileFormats/FFmpegPredOrderMethod"),(long)0));
|
||||
set_dict_int(&options, "muxrate", gPrefs->Read(wxT("/FileFormats/FFmpegMuxRate"),(long)0));
|
||||
mEncFormatCtx->packet_size = gPrefs->Read(wxT("/FileFormats/FFmpegPacketSize"),(long)0);
|
||||
mEncAudioCodecCtx->codec_id = (AVCodecID)gPrefs->Read(wxT("/FileFormats/FFmpegCodec"), mEncFormatDesc->audio_codec);
|
||||
codec = avcodec_find_encoder_by_name(gPrefs->Read(wxT("/FileFormats/FFmpegCodec")).ToUTF8());
|
||||
if (!codec)
|
||||
mEncAudioCodecCtx->codec_id = mEncFormatDesc->audio_codec;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user