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

merge from 1.0release for #268, the hls pcr is negative when startup. 2.0.78

This commit is contained in:
winlin 2014-12-29 08:45:19 +08:00
commit e27c95b0e8
3 changed files with 14 additions and 8 deletions

View file

@ -368,11 +368,16 @@ private:
}
static char* write_pcr(char* p, int64_t pcr)
{
*p++ = (char) (pcr >> 25);
*p++ = (char) (pcr >> 17);
*p++ = (char) (pcr >> 9);
*p++ = (char) (pcr >> 1);
*p++ = (char) (pcr << 7 | 0x7e);
// the pcr=dts-delay
// and the pcr maybe negative
// @see https://github.com/winlinvip/simple-rtmp-server/issues/268
int64_t v = srs_max(0, pcr);
*p++ = (char) (v >> 25);
*p++ = (char) (v >> 17);
*p++ = (char) (v >> 9);
*p++ = (char) (v >> 1);
*p++ = (char) (v << 7 | 0x7e);
*p++ = 0;
return p;

View file

@ -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 77
#define VERSION_REVISION 78
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_ROLE "origin/edge server"