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-05-30 21:40:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
03d951c0fbdf2fe0dcc8aefaadcc685115889ab5
03d951c0
1 parent
96f8f1f5
fix the audio or video pid generate bug.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
11 行增加
和
7 行删除
trunk/src/kernel/srs_kernel_ts.cpp
trunk/src/kernel/srs_kernel_ts.cpp
查看文件 @
03d951c
...
...
@@ -771,17 +771,21 @@ SrsTsPacket* SrsTsPacket::create_pmt(SrsTsContext* context, int16_t pmt_number,
pmt
->
last_section_number
=
0
;
pmt
->
program_info_length
=
0
;
// if h.264 specified, use video to carry pcr.
if
(
vs
==
SrsTsStreamVideoH264
)
{
pmt
->
PCR_PID
=
vpid
;
pmt
->
infos
.
push_back
(
new
SrsTsPayloadPMTESInfo
(
vs
,
vpid
));
}
else
if
(
as
==
SrsTsStreamAudioAAC
||
as
==
SrsTsStreamAudioMp3
)
{
// must got one valid codec.
srs_assert
(
vs
==
SrsTsStreamVideoH264
||
as
==
SrsTsStreamAudioAAC
||
as
==
SrsTsStreamAudioMp3
);
// if mp3 or aac specified, use audio to carry pcr.
if
(
as
==
SrsTsStreamAudioAAC
||
as
==
SrsTsStreamAudioMp3
)
{
// use audio to carray pcr by default.
// for hls, there must be atleast one audio channel.
pmt
->
PCR_PID
=
apid
;
pmt
->
infos
.
push_back
(
new
SrsTsPayloadPMTESInfo
(
as
,
apid
));
}
else
{
srs_assert
(
false
);
}
// if h.264 specified, use video to carry pcr.
if
(
vs
==
SrsTsStreamVideoH264
)
{
pmt
->
PCR_PID
=
vpid
;
pmt
->
infos
.
push_back
(
new
SrsTsPayloadPMTESInfo
(
vs
,
vpid
));
}
pmt
->
CRC_32
=
0
;
// calc in encode.
...
...
请
注册
或
登录
后发表评论