diff --git a/README.md b/README.md index f7a071141..e7ddd47af 100755 --- a/README.md +++ b/README.md @@ -521,6 +521,7 @@ Supported operating systems and hardware: ### SRS 2.0 history +* v2.0, 2015-01-25, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), refine the pcr start at 0, dts/pts plus delay. 2.0.105 * v2.0, 2015-01-25, hotfix [#151](https://github.com/winlinvip/simple-rtmp-server/issues/151), refine pcr=dts-800ms and use dts/pts directly. 2.0.104 * v2.0, 2015-01-23, hotfix [#151](https://github.com/winlinvip/simple-rtmp-server/issues/151), use absolutely overflow to make jwplayer happy. 2.0.103 * v2.0, 2015-01-22, for [#293](https://github.com/winlinvip/simple-rtmp-server/issues/293), support http live ts stream. 2.0.101. @@ -585,6 +586,7 @@ Supported operating systems and hardware: ### SRS 1.0 history +* v1.0, 2015-01-25, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), refine the pcr start at 0, dts/pts plus delay. 1.0.25 * v1.0, 2015-01-25, hotfix [#151](https://github.com/winlinvip/simple-rtmp-server/issues/151), refine pcr=dts-800ms and use dts/pts directly. 1.0.24 * v1.0, 2015-01-23, hotfix [#151](https://github.com/winlinvip/simple-rtmp-server/issues/151), use absolutely overflow to make jwplayer happy. 1.0.23 * v1.0, 2015-01-17, hotfix [#290](https://github.com/winlinvip/simple-rtmp-server/issues/290), use iformat only for rtmp input. 1.0.22 diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 2377ef845..3e78c335f 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -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 104 +#define VERSION_REVISION 105 // server info. #define RTMP_SIG_SRS_KEY "SRS" diff --git a/trunk/src/kernel/srs_kernel_ts.cpp b/trunk/src/kernel/srs_kernel_ts.cpp index e9f010fbb..dbf5a22b2 100644 --- a/trunk/src/kernel/srs_kernel_ts.cpp +++ b/trunk/src/kernel/srs_kernel_ts.cpp @@ -198,7 +198,7 @@ public: p[-1] |= 0x20; // Both Adaption and Payload *p++ = 7; // size *p++ = 0x50; // random access + PCR - p = write_pcr(p, frame->dts - SRS_AUTO_HLS_DELAY); + p = write_pcr(p, frame->dts); } // PES header @@ -330,10 +330,12 @@ private: } static char* write_pcr(char* p, int64_t pcr) { - // the pcr=dts-delay - // and the pcr maybe negative + // the pcr=dts-delay, where dts = frame->dts + delay + // and the pcr should never be negative // @see https://github.com/winlinvip/simple-rtmp-server/issues/268 - int64_t v = srs_max(0, pcr); + srs_assert(pcr >= 0); + + int64_t v = pcr; *p++ = (char) (v >> 25); *p++ = (char) (v >> 17);