mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
修复addFFmepgSource接口参数非法时无法清除记录表的bug (#2305)
捕获addFFmepgSource接口参数dst_url解析错误的抛错,通过错误回调返回返回错误,清除s_ffmpegMap表中的无效KEY
This commit is contained in:
parent
70ad9cb0b6
commit
6008ae157a
@ -78,7 +78,13 @@ void FFmpegSource::play(const string &ffmpeg_cmd_key, const string &src_url,cons
|
|||||||
_src_url = src_url;
|
_src_url = src_url;
|
||||||
_dst_url = dst_url;
|
_dst_url = dst_url;
|
||||||
_ffmpeg_cmd_key = ffmpeg_cmd_key;
|
_ffmpeg_cmd_key = ffmpeg_cmd_key;
|
||||||
|
|
||||||
|
try {
|
||||||
_media_info.parse(dst_url);
|
_media_info.parse(dst_url);
|
||||||
|
} catch (std::exception &ex) {
|
||||||
|
cb(SockException(Err_other, ex.what()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto ffmpeg_cmd = ffmpeg_cmd_default;
|
auto ffmpeg_cmd = ffmpeg_cmd_default;
|
||||||
if (!ffmpeg_cmd_key.empty()) {
|
if (!ffmpeg_cmd_key.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user