winlin

for #311, set pcr_base to dts. 2.0.114.

@@ -525,6 +525,8 @@ Supported operating systems and hardware: @@ -525,6 +525,8 @@ Supported operating systems and hardware:
525 525
526 ### SRS 2.0 history 526 ### SRS 2.0 history
527 527
  528 +* v2.0, 2015-02-10, for [#311](https://github.com/winlinvip/simple-rtmp-server/issues/311), set pcr_base to dts. 2.0.114.
  529 +* v2.0, 2015-02-10, fix [the bug](https://github.com/winlinvip/simple-rtmp-server/commit/87519aaae835199e5adb60c0ae2c1cd24939448c) of ibmf format which decoded in annexb.
528 * v2.0, 2015-02-10, for [#310](https://github.com/winlinvip/simple-rtmp-server/issues/310), downcast aac SSR to LC. 2.0.113 530 * v2.0, 2015-02-10, for [#310](https://github.com/winlinvip/simple-rtmp-server/issues/310), downcast aac SSR to LC. 2.0.113
529 * 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 531 * 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
530 * 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 532 * 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
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR 2 32 #define VERSION_MAJOR 2
33 #define VERSION_MINOR 0 33 #define VERSION_MINOR 0
34 -#define VERSION_REVISION 114 34 +#define VERSION_REVISION 115
35 35
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"
@@ -78,10 +78,6 @@ int aac_sample_rates[] = @@ -78,10 +78,6 @@ int aac_sample_rates[] =
78 7350, 0, 0, 0 78 7350, 0, 0, 0
79 }; 79 };
80 80
81 -// @see: NGX_RTMP_HLS_DELAY,  
82 -// 63000: 700ms, ts_tbn=90000  
83 -#define SRS_AUTO_HLS_DELAY 63000  
84 -  
85 // @see: ngx_rtmp_mpegts_header 81 // @see: ngx_rtmp_mpegts_header
86 u_int8_t mpegts_header[] = { 82 u_int8_t mpegts_header[] = {
87 /* TS */ 83 /* TS */
@@ -228,6 +224,7 @@ public: @@ -228,6 +224,7 @@ public:
228 p[-1] |= 0x20; // Both Adaption and Payload 224 p[-1] |= 0x20; // Both Adaption and Payload
229 *p++ = 7; // size 225 *p++ = 7; // size
230 *p++ = 0x50; // random access + PCR 226 *p++ = 0x50; // random access + PCR
  227 + // @see https://github.com/winlinvip/simple-rtmp-server/issues/311
231 p = write_pcr(p, frame->dts); 228 p = write_pcr(p, frame->dts);
232 } 229 }
233 230
@@ -284,11 +281,11 @@ public: @@ -284,11 +281,11 @@ public:
284 *p++ = header_size; 281 *p++ = header_size;
285 282
286 // pts; // 33bits 283 // pts; // 33bits
287 - p = write_dts_pts(p, flags >> 6, frame->pts + SRS_AUTO_HLS_DELAY); 284 + p = write_dts_pts(p, flags >> 6, frame->pts);
288 285
289 // dts; // 33bits 286 // dts; // 33bits
290 if (frame->dts != frame->pts) { 287 if (frame->dts != frame->pts) {
291 - p = write_dts_pts(p, 1, frame->dts + SRS_AUTO_HLS_DELAY); 288 + p = write_dts_pts(p, 1, frame->dts);
292 } 289 }
293 } 290 }
294 291