Skip to content

Commit

Permalink
For ossrs#1500, add a gb28181 configure file
Browse files Browse the repository at this point in the history
  • Loading branch information
basson099 committed Mar 20, 2020
1 parent 0635a0e commit 14daf8f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
25 changes: 25 additions & 0 deletions trunk/conf/gb28181.stream.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 28181 stream server configuration.
# @see full.conf for detail config.

listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;

http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
listen 8080;
}
28181_stream_server {
enabled on;
listen_port_min 55000;
listen_port_max 65000;
}
vhost __defaultVhost__ {
}


6 changes: 5 additions & 1 deletion trunk/src/app/srs_app_gb28181.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ srs_error_t Srs28181StreamCore::on_stream_video(Srs2SRtpPacket *pkt, int64_t dts
continue;
}

if(sps.length() < 4){
srs_warn("h264-ps stream: sps length < 4 !");
continue;
}

if (h264_sps != sps)
{
h264_sps = sps;
Expand Down Expand Up @@ -794,7 +799,6 @@ srs_error_t Srs28181StreamCore::on_stream_video(Srs2SRtpPacket *pkt, int64_t dts
// set sps/pps
if (h264_sps_changed && h264_pps_changed)
{

h264_sps_changed = false;
h264_pps_changed = false;
h264_sps_pps_sent = true;
Expand Down

0 comments on commit 14daf8f

Please sign in to comment.