mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #268, the hls pcr is negative when startup. 1.0.14
This commit is contained in:
parent
e77e4cfb8b
commit
513c1ec6d5
3 changed files with 12 additions and 6 deletions
|
@ -383,6 +383,7 @@ Supported operating systems and hardware:
|
||||||
* 2013-10-17, Created.<br/>
|
* 2013-10-17, Created.<br/>
|
||||||
|
|
||||||
## History
|
## History
|
||||||
|
* v1.0, 2014-12-29, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), the hls pcr is negative when startup. 1.0.14
|
||||||
* v1.0, 2014-12-22, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), ignore NALU when sequence header to make HLS happy. 1.0.12
|
* v1.0, 2014-12-22, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), ignore NALU when sequence header to make HLS happy. 1.0.12
|
||||||
* v1.0, 2014-12-20, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), support disconnect publish connect when hls error. 1.0.11
|
* v1.0, 2014-12-20, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), support disconnect publish connect when hls error. 1.0.11
|
||||||
* <strong>v1.0, 2014-12-05, [1.0 release(1.0.10)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0) released. 59391 lines.</strong>
|
* <strong>v1.0, 2014-12-05, [1.0 release(1.0.10)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0) released. 59391 lines.</strong>
|
||||||
|
|
|
@ -368,11 +368,16 @@ private:
|
||||||
}
|
}
|
||||||
static char* write_pcr(char* p, int64_t pcr)
|
static char* write_pcr(char* p, int64_t pcr)
|
||||||
{
|
{
|
||||||
*p++ = (char) (pcr >> 25);
|
// the pcr=dts-delay
|
||||||
*p++ = (char) (pcr >> 17);
|
// and the pcr maybe negative
|
||||||
*p++ = (char) (pcr >> 9);
|
// @see https://github.com/winlinvip/simple-rtmp-server/issues/268
|
||||||
*p++ = (char) (pcr >> 1);
|
int64_t v = srs_max(0, pcr);
|
||||||
*p++ = (char) (pcr << 7 | 0x7e);
|
|
||||||
|
*p++ = (char) (v >> 25);
|
||||||
|
*p++ = (char) (v >> 17);
|
||||||
|
*p++ = (char) (v >> 9);
|
||||||
|
*p++ = (char) (v >> 1);
|
||||||
|
*p++ = (char) (v << 7 | 0x7e);
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
|
|
|
@ -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 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 13
|
#define VERSION_REVISION 14
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
#define RTMP_SIG_SRS_ROLE "origin/edge server"
|
#define RTMP_SIG_SRS_ROLE "origin/edge server"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue