1
0
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:
benjamin.drung@gmail.com
2014-05-27 21:36:01 +00:00
parent da47fe0373
commit 73295bbc02
2 changed files with 5 additions and 3 deletions

View File

@@ -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;