Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
5a45c863
提交
5a45c863
authored
5月 03, 2016
作者:
Seven Du
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-9115 #resolve #comment trying to support audio only mp4 recording, please test
上级
3c99e139
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
12 行增加
和
2 行删除
+12
-2
avformat.c
src/mod/applications/mod_av/avformat.c
+12
-2
没有找到文件。
src/mod/applications/mod_av/avformat.c
浏览文件 @
5a45c863
...
@@ -1244,6 +1244,7 @@ struct av_file_context {
...
@@ -1244,6 +1244,7 @@ struct av_file_context {
switch_timer_t
video_timer
;
switch_timer_t
video_timer
;
int
offset
;
int
offset
;
int
audio_start
;
int
audio_start
;
int
aud_ready
;
int
vid_ready
;
int
vid_ready
;
int
audio_ready
;
int
audio_ready
;
int
closed
;
int
closed
;
...
@@ -1861,8 +1862,17 @@ static switch_status_t av_file_write(switch_file_handle_t *handle, void *data, s
...
@@ -1861,8 +1862,17 @@ static switch_status_t av_file_write(switch_file_handle_t *handle, void *data, s
}
}
if
(
!
context
->
vid_ready
)
{
if
(
!
context
->
vid_ready
)
{
switch_buffer_zero
(
context
->
audio_buffer
);
if
(
switch_test_flag
(
handle
,
SWITCH_FILE_FLAG_VIDEO
))
{
return
status
;
switch_buffer_zero
(
context
->
audio_buffer
);
return
status
;
}
else
if
(
!
context
->
aud_ready
)
{
// audio only recording
int
ret
=
avformat_write_header
(
context
->
fc
,
NULL
);
if
(
ret
<
0
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Error occurred when opening output file: %s
\n
"
,
get_error_text
(
ret
));
return
SWITCH_STATUS_FALSE
;
}
context
->
aud_ready
=
1
;
}
}
}
if
(
data
&&
len
)
{
if
(
data
&&
len
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论