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-03-26 19:52:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a5c5befad10e7b4c331d2eb095e315e83c69502c
a5c5befa
1 parent
896983c1
for parse video ts.
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
5 行增加
和
12 行删除
trunk/src/app/srs_app_mpegts_udp.cpp
trunk/src/app/srs_app_mpegts_udp.cpp
查看文件 @
a5c5bef
...
...
@@ -353,7 +353,6 @@ int SrsMpegtsOverUdp::on_ts_video(SrsTsMessage* msg, SrsStream* avs)
int
ibpframe_size
=
avs
->
size
()
-
avs
->
pos
();
// send each frame.
bool
got_sps_pps
=
false
;
while
(
!
avs
->
empty
())
{
char
*
frame
=
NULL
;
int
frame_size
=
0
;
...
...
@@ -370,8 +369,6 @@ int SrsMpegtsOverUdp::on_ts_video(SrsTsMessage* msg, SrsStream* avs)
// for sps
if
(
avc
->
is_sps
(
frame
,
frame_size
))
{
got_sps_pps
=
true
;
std
::
string
sps
;
if
((
ret
=
avc
->
sps_demux
(
frame
,
frame_size
,
sps
))
!=
ERROR_SUCCESS
)
{
return
ret
;
...
...
@@ -410,18 +407,14 @@ int SrsMpegtsOverUdp::on_ts_video(SrsTsMessage* msg, SrsStream* avs)
continue
;
}
break
;
}
// not ibp frame, ignore for already sent.
if
(
got_sps_pps
)
{
srs_info
(
"mpegts: already send the sps/pps."
);
// ibp frame.
srs_info
(
"mpegts: demux avc ibp frame size=%d, dts=%d"
,
ibpframe_size
,
dts
);
if
((
ret
=
write_h264_ipb_frame
(
frame
,
frame_size
,
dts
,
pts
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
}
// ibp frame.
srs_info
(
"mpegts: demux avc ibp frame size=%d, dts=%d"
,
ibpframe_size
,
dts
);
return
write_h264_ipb_frame
(
ibpframe
,
ibpframe_size
,
dts
,
pts
);
return
ret
;
}
int
SrsMpegtsOverUdp
::
write_h264_sps_pps
(
u_int32_t
dts
,
u_int32_t
pts
)
...
...
请
注册
或
登录
后发表评论