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
ME_Kun_Han
2017-04-15 16:49:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
winlin
2017-04-15 16:49:02 +0800
Commit
bd2a1f9d3c02d77a7ee1f8db1e6bf3229c082a3f
bd2a1f9d
1 parent
b11ddc7f
fixed bug: video rendering in hls stream generates only vertical parttern (#841)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
trunk/src/kernel/srs_kernel_ts.cpp
trunk/src/kernel/srs_kernel_ts.cpp
查看文件 @
bd2a1f9
...
...
@@ -3039,6 +3039,7 @@ int SrsTsCache::do_cache_avc(SrsAvcAacCodec* codec, SrsCodecSample* sample)
video
->
payload
->
append
((
const
char
*
)
default_aud_nalu
,
2
);
}
bool
is_sps_pps_appended
=
false
;
// all sample use cont nalu header, except the sps-pps before IDR frame.
for
(
int
i
=
0
;
i
<
sample
->
nb_sample_units
;
i
++
)
{
SrsCodecSampleUnit
*
sample_unit
=
&
sample
->
sample_units
[
i
];
...
...
@@ -3056,7 +3057,7 @@ int SrsTsCache::do_cache_avc(SrsAvcAacCodec* codec, SrsCodecSample* sample)
// Insert sps/pps before IDR when there is no sps/pps in samples.
// The sps/pps is parsed from sequence header(generally the first flv packet).
if
(
nal_unit_type
==
SrsAvcNaluTypeIDR
&&
!
sample
->
has_sps_pps
)
{
if
(
nal_unit_type
==
SrsAvcNaluTypeIDR
&&
!
sample
->
has_sps_pps
&&
!
is_sps_pps_appended
)
{
if
(
codec
->
sequenceParameterSetLength
>
0
)
{
srs_avc_insert_aud
(
video
->
payload
,
aud_inserted
);
video
->
payload
->
append
(
codec
->
sequenceParameterSetNALUnit
,
codec
->
sequenceParameterSetLength
);
...
...
@@ -3065,6 +3066,7 @@ int SrsTsCache::do_cache_avc(SrsAvcAacCodec* codec, SrsCodecSample* sample)
srs_avc_insert_aud
(
video
->
payload
,
aud_inserted
);
video
->
payload
->
append
(
codec
->
pictureParameterSetNALUnit
,
codec
->
pictureParameterSetLength
);
}
is_sps_pps_appended
=
true
;
}
// Insert the NALU to video in annexb.
...
...
请
注册
或
登录
后发表评论