Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
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
winlin
2015-03-11 15:54:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a739b2c55538f736eed2f65ede851703e68e6b15
a739b2c5
1 parent
3e5821ef
fix the bug for fork ffmpeg in mac, the local variable is unvailable.
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
36 行增加
和
24 行删除
trunk/research/librtmp/srs_ingest_flv.c
trunk/research/librtmp/srs_ingest_rtmp.c
trunk/src/app/srs_app_ffmpeg.cpp
trunk/research/librtmp/srs_ingest_flv.c
查看文件 @
a739b2c
...
...
@@ -76,17 +76,25 @@ int main(int argc, char** argv)
exit
(
-
1
);
}
// parse options in FFMPEG format.
while
((
opt
=
getopt
(
argc
,
argv
,
"i:y:"
))
!=
-
1
)
{
switch
(
opt
)
{
case
'i'
:
in_flv_file
=
optarg
;
break
;
case
'y'
:
out_rtmp_url
=
optarg
;
break
;
default:
break
;
for
(
opt
=
0
;
opt
<
argc
;
opt
++
)
{
srs_human_trace
(
"argv[%d]=%s"
,
opt
,
argv
[
opt
]);
}
// fill the options for mac
for
(
opt
=
0
;
opt
<
argc
-
1
;
opt
++
)
{
// ignore all options except -i and -y.
char
*
p
=
argv
[
opt
];
// only accept -x
if
(
p
[
0
]
!=
'-'
||
p
[
1
]
==
0
||
p
[
2
]
!=
0
)
{
continue
;
}
// parse according the option name.
switch
(
p
[
1
])
{
case
'i'
:
in_flv_file
=
argv
[
opt
+
1
];
break
;
case
'y'
:
out_rtmp_url
=
argv
[
opt
+
1
];
break
;
default:
break
;
}
}
...
...
trunk/research/librtmp/srs_ingest_rtmp.c
查看文件 @
a739b2c
...
...
@@ -61,17 +61,21 @@ int main(int argc, char** argv)
exit
(
-
1
);
}
// parse options in FFMPEG format.
while
((
opt
=
getopt
(
argc
,
argv
,
"i:y:"
))
!=
-
1
)
{
switch
(
opt
)
{
case
'i'
:
in_rtmp_url
=
optarg
;
break
;
case
'y'
:
out_rtmp_url
=
optarg
;
break
;
default:
break
;
// fill the options for mac
for
(
opt
=
0
;
opt
<
argc
-
1
;
opt
++
)
{
// ignore all options except -i and -y.
char
*
p
=
argv
[
opt
];
// only accept -x
if
(
p
[
0
]
!=
'-'
||
p
[
1
]
==
0
||
p
[
2
]
!=
0
)
{
continue
;
}
// parse according the option name.
switch
(
p
[
1
])
{
case
'i'
:
in_rtmp_url
=
argv
[
opt
+
1
];
break
;
case
'y'
:
out_rtmp_url
=
argv
[
opt
+
1
];
break
;
default:
break
;
}
}
...
...
trunk/src/app/srs_app_ffmpeg.cpp
查看文件 @
a739b2c
...
...
@@ -432,8 +432,8 @@ int SrsFFMPEG::start()
// memory leak in child process, it's ok.
char
**
charpv_params
=
new
char
*
[
params
.
size
()
+
1
];
for
(
int
i
=
0
;
i
<
(
int
)
params
.
size
();
i
++
)
{
std
::
string
p
=
params
[
i
];
charpv_params
[
i
]
=
(
char
*
)
p
.
c_str
();
std
::
string
&
p
=
params
[
i
];
charpv_params
[
i
]
=
(
char
*
)
p
.
data
();
}
// EOF: NULL
charpv_params
[
params
.
size
()]
=
NULL
;
...
...
请
注册
或
登录
后发表评论