diff options
| author | Vlad Firoiu <vladfi2@gmail.com> | 2017-02-21 11:04:22 -0800 |
|---|---|---|
| committer | Vlad Firoiu <vladfi2@gmail.com> | 2017-02-27 23:45:12 -0800 |
| commit | 21e66e60e33e2f2535b1521463f5f89955d5cd42 (patch) | |
| tree | 2ba506359f373dd99f3a773a7c0d6a6c59376878 /Source/Core/VideoCommon/AVIDump.cpp | |
| parent | a1a9e488a556ffa4763336711e7726eb7eb92f15 (diff) | |
Configable dump codec.
Diffstat (limited to 'Source/Core/VideoCommon/AVIDump.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AVIDump.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp index ef9ccaeed4..ccf355c712 100644 --- a/Source/Core/VideoCommon/AVIDump.cpp +++ b/Source/Core/VideoCommon/AVIDump.cpp @@ -96,8 +96,6 @@ bool AVIDump::Start(int w, int h) bool AVIDump::CreateVideoFile() { - AVCodec* codec = nullptr; - const std::string& s_format = g_Config.sDumpFormat; std::stringstream file_ss; @@ -130,8 +128,10 @@ bool AVIDump::CreateVideoFile() } avformat_alloc_output_context2(&s_format_context, output_format, nullptr, filename.c_str()); - AVCodecID codec_id = - g_Config.bUseFFV1 ? AV_CODEC_ID_FFV1 : output_format->video_codec; + const AVCodecDescriptor* codec_desc = avcodec_descriptor_get_by_name(g_Config.sDumpCodec.c_str()); + AVCodecID codec_id = codec_desc ? codec_desc->id : output_format->video_codec; + + const AVCodec* codec = nullptr; if (!(codec = avcodec_find_encoder(codec_id)) || !(s_codec_context = avcodec_alloc_context3(codec))) |
