提交 37e726b7 authored 作者: William King's avatar William King

Confirm we can open the file successfully before trying to add it to a libvlc media player

上级 82034755
......@@ -123,6 +123,11 @@ static switch_status_t vlc_file_open(switch_file_handle_t *handle, const char *p
context->m = libvlc_media_new_location(read_inst, context->path);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "VLC Path is unknown type %s\n", context->path);
}
if ( context-m == NULL ) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "VLC error opening %s for reading\n", path);
return SWITCH_STATUS_GENERR;
}
context->playing = 0;
context->err = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论