Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
merge_av
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
2018-01-23 19:32:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8da1f2b089e7b0ac93df3e86af56953c739076af
8da1f2b0
1 parent
92195054
use first name
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
6 行增加
和
3 行删除
merge_av/merge_av.cpp
merge_av/merge_av.cpp
查看文件 @
8da1f2b
...
...
@@ -813,7 +813,7 @@ int get_output_file_name(int i, const char * file_prefix, char * outputfile){
return
0
;
}
bool
is_need_output
(
int
nOutPutFile
,
vector
<
media_info
>
&
cur_processing
,
char
*
outputfile
)
bool
is_need_output
(
int
nOutPutFile
,
vector
<
media_info
>
&
cur_processing
,
c
onst
char
*
first_file
,
c
har
*
outputfile
)
{
if
(
sorted_infos
.
size
())
{
int
lastEnd
=
cur_processing
[
cur_processing
.
size
()
-
1
].
type_time
;
...
...
@@ -823,7 +823,7 @@ bool is_need_output(int nOutPutFile, vector<media_info> & cur_processing, char *
}
}
get_output_file_name
(
nOutPutFile
,
cur_processing
[
0
].
name
.
c_str
()
,
outputfile
);
get_output_file_name
(
nOutPutFile
,
first_file
,
outputfile
);
return
true
;
}
...
...
@@ -839,9 +839,11 @@ int process_va_files()
{
char
outputfile
[
1024
];
vector
<
media_info
>
cur_processing
;
int
nOutPutFile
=
0
;
float
start_time
;
bool
is_start
=
true
;
string
start_file
;
while
(
sorted_infos
.
size
())
{
...
...
@@ -870,9 +872,10 @@ int process_va_files()
//if the duration between the processed end and the start of not processed is large than 200 ms, reopen a new file
if
(
is_start
){
start_time
=
cur_processing
[
0
].
start_time
;
start_file
=
cur_processing
[
0
].
name
;
is_start
=
false
;
}
if
(
is_need_output
(
nOutPutFile
,
cur_processing
,
outputfile
)){
if
(
is_need_output
(
nOutPutFile
,
cur_processing
,
start_file
.
c_str
(),
outputfile
)){
nOutPutFile
++
;
concate_files_and_adjust_timecode
(
outputfile
);
save_out_info
(
start_time
,
outputfile
);
...
...
请
注册
或
登录
后发表评论