diff options
| author | Mat M <mathew1800@gmail.com> | 2018-07-16 23:44:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-16 23:44:18 -0400 |
| commit | 944b5fade625823814c04b4acbf835c89fbd191d (patch) | |
| tree | c6b53ccf4fba782958269b02faca18144ba7d2cd /Source/Core/VideoCommon/AVIDump.cpp | |
| parent | 5516731a72ef522d09475fe30c057145de5e62aa (diff) | |
| parent | 857138a0ba051152529b8695fe775924c857f908 (diff) | |
Merge pull request #7264 from ligfx/ffmpeg_deprecations
Fix deprecation warnings with recent FFmpeg versions
Diffstat (limited to 'Source/Core/VideoCommon/AVIDump.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AVIDump.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp index 71540d8bfb..b8cdf1ca1c 100644 --- a/Source/Core/VideoCommon/AVIDump.cpp +++ b/Source/Core/VideoCommon/AVIDump.cpp @@ -58,7 +58,9 @@ static void InitAVCodec() static bool first_run = true; if (first_run) { +#if LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100) av_register_all(); +#endif avformat_network_init(); first_run = false; } @@ -222,16 +224,16 @@ bool AVIDump::CreateVideoFile() return false; } - NOTICE_LOG(VIDEO, "Opening file %s for dumping", s_format_context->filename); - if (avio_open(&s_format_context->pb, s_format_context->filename, AVIO_FLAG_WRITE) < 0 || + NOTICE_LOG(VIDEO, "Opening file %s for dumping", dump_path.c_str()); + if (avio_open(&s_format_context->pb, dump_path.c_str(), AVIO_FLAG_WRITE) < 0 || avformat_write_header(s_format_context, nullptr)) { - ERROR_LOG(VIDEO, "Could not open %s", s_format_context->filename); + ERROR_LOG(VIDEO, "Could not open %s", dump_path.c_str()); return false; } - OSD::AddMessage(StringFromFormat("Dumping Frames to \"%s\" (%dx%d)", s_format_context->filename, - s_width, s_height)); + OSD::AddMessage( + StringFromFormat("Dumping Frames to \"%s\" (%dx%d)", dump_path.c_str(), s_width, s_height)); return true; } |
