1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #311, set pcr_base to dts. 2.0.114.

This commit is contained in:
winlin 2015-02-10 23:15:43 +08:00
parent 87519aaae8
commit e19ee0cb99
3 changed files with 6 additions and 7 deletions

View file

@ -525,6 +525,8 @@ Supported operating systems and hardware:
### SRS 2.0 history ### SRS 2.0 history
* v2.0, 2015-02-10, for [#311](https://github.com/winlinvip/simple-rtmp-server/issues/311), set pcr_base to dts. 2.0.114.
* v2.0, 2015-02-10, fix [the bug](https://github.com/winlinvip/simple-rtmp-server/commit/87519aaae835199e5adb60c0ae2c1cd24939448c) of ibmf format which decoded in annexb.
* v2.0, 2015-02-10, for [#310](https://github.com/winlinvip/simple-rtmp-server/issues/310), downcast aac SSR to LC. 2.0.113 * v2.0, 2015-02-10, for [#310](https://github.com/winlinvip/simple-rtmp-server/issues/310), downcast aac SSR to LC. 2.0.113
* v2.0, 2015-02-03, fix [#136](https://github.com/winlinvip/simple-rtmp-server/issues/136), support hls without io(in ram). 2.0.112 * v2.0, 2015-02-03, fix [#136](https://github.com/winlinvip/simple-rtmp-server/issues/136), support hls without io(in ram). 2.0.112
* v2.0, 2015-01-31, for [#250](https://github.com/winlinvip/simple-rtmp-server/issues/250), support push MPEGTS over UDP to SRS. 2.0.111 * v2.0, 2015-01-31, for [#250](https://github.com/winlinvip/simple-rtmp-server/issues/250), support push MPEGTS over UDP to SRS. 2.0.111

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR 2 #define VERSION_MAJOR 2
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 114 #define VERSION_REVISION 115
// server info. // server info.
#define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_KEY "SRS"

View file

@ -78,10 +78,6 @@ int aac_sample_rates[] =
7350, 0, 0, 0 7350, 0, 0, 0
}; };
// @see: NGX_RTMP_HLS_DELAY,
// 63000: 700ms, ts_tbn=90000
#define SRS_AUTO_HLS_DELAY 63000
// @see: ngx_rtmp_mpegts_header // @see: ngx_rtmp_mpegts_header
u_int8_t mpegts_header[] = { u_int8_t mpegts_header[] = {
/* TS */ /* TS */
@ -228,6 +224,7 @@ public:
p[-1] |= 0x20; // Both Adaption and Payload p[-1] |= 0x20; // Both Adaption and Payload
*p++ = 7; // size *p++ = 7; // size
*p++ = 0x50; // random access + PCR *p++ = 0x50; // random access + PCR
// @see https://github.com/winlinvip/simple-rtmp-server/issues/311
p = write_pcr(p, frame->dts); p = write_pcr(p, frame->dts);
} }
@ -284,11 +281,11 @@ public:
*p++ = header_size; *p++ = header_size;
// pts; // 33bits // pts; // 33bits
p = write_dts_pts(p, flags >> 6, frame->pts + SRS_AUTO_HLS_DELAY); p = write_dts_pts(p, flags >> 6, frame->pts);
// dts; // 33bits // dts; // 33bits
if (frame->dts != frame->pts) { if (frame->dts != frame->pts) {
p = write_dts_pts(p, 1, frame->dts + SRS_AUTO_HLS_DELAY); p = write_dts_pts(p, 1, frame->dts);
} }
} }