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
2013-11-24 15:11:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ecc8688455134fcc9752caee4ea852d287a54e41
ecc86884
1 parent
c243ad32
ensure sequence header is ok when parse avc/aac data
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
14 行增加
和
0 行删除
trunk/src/core/srs_core_codec.cpp
trunk/src/core/srs_core_codec.cpp
查看文件 @
ecc8688
...
...
@@ -116,6 +116,13 @@ int SrsCodec::audio_aac_demux(int8_t* data, int size)
memcpy
(
aac_extra_data
,
data
+
stream
->
pos
(),
aac_extra_size
);
}
}
else
if
(
aac_packet_type
==
SrsCodecAudioTypeRawData
)
{
// ensure the sequence header demuxed
if
(
aac_extra_size
<=
0
||
!
aac_extra_data
)
{
ret
=
ERROR_HLS_DECODE_ERROR
;
srs_error
(
"hls decode audio aac failed, sequence header not found. ret=%d"
,
ret
);
return
ret
;
}
// Raw AAC frame data in UI8 []
// 6.3 Raw Data, aac-iso-13818-7.pdf, page 28
}
else
{
...
...
@@ -206,6 +213,13 @@ int SrsCodec::video_avc_demux(int8_t* data, int size)
* pictureParameterSetNALUnit
*/
}
else
if
(
avc_packet_type
==
SrsCodecVideoAVCTypeNALU
){
// ensure the sequence header demuxed
if
(
avc_extra_size
<=
0
||
!
avc_extra_data
)
{
ret
=
ERROR_HLS_DECODE_ERROR
;
srs_error
(
"hls decode video avc failed, sequence header not found. ret=%d"
,
ret
);
return
ret
;
}
// One or more NALUs (Full frames are required)
// 5.3.4.2.1 Syntax, H.264-AVC-ISO_IEC_14496-15.pdf, page 20
int
PictureLength
=
size
-
stream
->
pos
();
...
...
请
注册
或
登录
后发表评论