Skip to content

Commit

Permalink
for ossrs#311, set pcr_base to dts. 2.0.114.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Feb 10, 2015
1 parent 87519aa commit e19ee0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ Supported operating systems and hardware:

### 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-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
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 114
#define VERSION_REVISION 115

// server info.
#define RTMP_SIG_SRS_KEY "SRS"
Expand Down
9 changes: 3 additions & 6 deletions trunk/src/kernel/srs_kernel_ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ int aac_sample_rates[] =
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
u_int8_t mpegts_header[] = {
/* TS */
Expand Down Expand Up @@ -228,6 +224,7 @@ class SrsMpegtsWriter
p[-1] |= 0x20; // Both Adaption and Payload
*p++ = 7; // size
*p++ = 0x50; // random access + PCR
// @see https://github.com/winlinvip/simple-rtmp-server/issues/311
p = write_pcr(p, frame->dts);
}

Expand Down Expand Up @@ -284,11 +281,11 @@ class SrsMpegtsWriter
*p++ = header_size;

// 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
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);
}
}

Expand Down

0 comments on commit e19ee0c

Please sign in to comment.