AVIDump: use dump_path rather than deprecated AVFormatContext::filename
AVFormatContext::filename was deprecated in lavf 58.7.100 in favor of AVFormatContext::url. Instead of adding version-checking logic, just use the passed-in dump path instead.
This commit is contained in:
parent
e45698aaa0
commit
857138a0ba
|
@ -224,16 +224,16 @@ bool AVIDump::CreateVideoFile()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
NOTICE_LOG(VIDEO, "Opening file %s for dumping", s_format_context->filename);
|
NOTICE_LOG(VIDEO, "Opening file %s for dumping", dump_path.c_str());
|
||||||
if (avio_open(&s_format_context->pb, s_format_context->filename, AVIO_FLAG_WRITE) < 0 ||
|
if (avio_open(&s_format_context->pb, dump_path.c_str(), AVIO_FLAG_WRITE) < 0 ||
|
||||||
avformat_write_header(s_format_context, nullptr))
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSD::AddMessage(StringFromFormat("Dumping Frames to \"%s\" (%dx%d)", s_format_context->filename,
|
OSD::AddMessage(
|
||||||
s_width, s_height));
|
StringFromFormat("Dumping Frames to \"%s\" (%dx%d)", dump_path.c_str(), s_width, s_height));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue