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
2014-04-19 12:49:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5c8aad4fe428ebbf0debf955fbfb10c2031dce70
5c8aad4f
1 parent
c530a8e5
fix bug of ingest for android, init the variable to 0
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
9 行增加
和
5 行删除
trunk/research/librtmp/srs_ingest_flv.c
trunk/research/librtmp/srs_ingest_flv.c
100644 → 100755
查看文件 @
5c8aad4
...
...
@@ -229,7 +229,7 @@ int flv_read_packet(int flv_fd, int* type, u_int32_t* timestamp, char** data, in
char
th
[
11
];
// tag header
char
ts
[
4
];
// tag size
u_int32_t
data_size
=
0
;
int32_t
data_size
=
0
;
u_int32_t
time
=
0
;
char
*
pp
;
...
...
@@ -263,17 +263,21 @@ int flv_read_packet(int flv_fd, int* type, u_int32_t* timestamp, char** data, in
*
timestamp
=
time
;
if
(
data_size
>
0
)
{
// check data size.
if
(
data_size
<=
0
)
{
ret
=
-
1
;
trace
(
"invalid data size. size=%d, ret=%d"
,
data_size
,
ret
);
return
ret
;
}
// read tag data.
*
size
=
data_size
;
*
data
=
(
char
*
)
malloc
(
data_size
);
// read tag data
if
(
read
(
flv_fd
,
*
data
,
data_size
)
!=
data_size
)
{
ret
=
-
1
;
trace
(
"read flv tag data failed. size=%d, ret=%d"
,
data_size
,
ret
);
return
ret
;
}
}
// ignore 4bytes tag size.
if
(
read
(
flv_fd
,
ts
,
sizeof
(
ts
))
!=
sizeof
(
ts
))
{
...
...
请
注册
或
登录
后发表评论