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-01-19 00:14:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
15d87537a18ed1b56e310315d60a8b29f96985a7
15d87537
1 parent
3244c083
for bug #293, support aac stream.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
trunk/src/kernel/srs_kernel_aac.cpp
trunk/src/kernel/srs_kernel_aac.cpp
查看文件 @
15d8753
...
...
@@ -145,7 +145,7 @@ int SrsAacEncoder::write_audio(int64_t timestamp, char* data, int size)
}
// the left is the aac raw frame data.
int16_t
aac_
frame
_length
=
stream
->
size
()
-
stream
->
pos
();
int16_t
aac_
raw
_length
=
stream
->
size
()
-
stream
->
pos
();
// write the ADTS header.
// @see aac-mp4a-format-ISO_IEC_14496-3+2001.pdf, page 75,
...
...
@@ -169,6 +169,7 @@ int SrsAacEncoder::write_audio(int64_t timestamp, char* data, int size)
char
aac_fixed_header
[
7
];
if
(
true
)
{
char
*
pp
=
aac_fixed_header
;
int16_t
aac_frame_length
=
aac_raw_length
+
7
;
// Syncword 12 bslbf
*
pp
++
=
0xff
;
...
...
@@ -212,7 +213,7 @@ int SrsAacEncoder::write_audio(int64_t timestamp, char* data, int size)
}
// write aac frame body.
if
((
ret
=
_fs
->
write
(
data
+
stream
->
pos
(),
aac_
frame
_length
,
NULL
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
_fs
->
write
(
data
+
stream
->
pos
(),
aac_
raw
_length
,
NULL
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
...
...
请
注册
或
登录
后发表评论