mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix the aggregate bug, adjust to starttime of msg. 2.0.91
This commit is contained in:
parent
5aa31568ba
commit
0e9c9db3f4
3 changed files with 13 additions and 2 deletions
|
@ -1481,6 +1481,9 @@ int SrsSource::on_aggregate(SrsCommonMessage* msg)
|
|||
return ret;
|
||||
}
|
||||
|
||||
// the aggregate message always use abs time.
|
||||
int delta = -1;
|
||||
|
||||
while (!stream->empty()) {
|
||||
if (!stream->require(1)) {
|
||||
ret = ERROR_RTMP_AGGREGATE;
|
||||
|
@ -1519,6 +1522,12 @@ int SrsSource::on_aggregate(SrsCommonMessage* msg)
|
|||
timestamp |= time_h<<24;
|
||||
timestamp &= 0x7FFFFFFF;
|
||||
|
||||
// adjust abs timestamp in aggregate msg.
|
||||
if (delta < 0) {
|
||||
delta = (int)msg->header.timestamp - (int)timestamp;
|
||||
}
|
||||
timestamp += delta;
|
||||
|
||||
if (!stream->require(3)) {
|
||||
ret = ERROR_RTMP_AGGREGATE;
|
||||
srs_error("invalid aggregate message stream_id. ret=%d", ret);
|
||||
|
|
|
@ -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 90
|
||||
#define VERSION_REVISION 91
|
||||
// server info.
|
||||
#define RTMP_SIG_SRS_KEY "SRS"
|
||||
#define RTMP_SIG_SRS_ROLE "origin/edge server"
|
||||
|
|
|
@ -823,7 +823,9 @@ int __srs_rtmp_on_aggregate(Context* context, SrsCommonMessage* msg)
|
|||
return ret;
|
||||
}
|
||||
|
||||
// the aggregate message always use abs time.
|
||||
int delta = -1;
|
||||
|
||||
while (!stream->empty()) {
|
||||
if (!stream->require(1)) {
|
||||
ret = ERROR_RTMP_AGGREGATE;
|
||||
|
@ -862,7 +864,7 @@ int __srs_rtmp_on_aggregate(Context* context, SrsCommonMessage* msg)
|
|||
timestamp |= time_h<<24;
|
||||
timestamp &= 0x7FFFFFFF;
|
||||
|
||||
// adjust timestamp.
|
||||
// adjust abs timestamp in aggregate msg.
|
||||
if (delta < 0) {
|
||||
delta = (int)msg->header.timestamp - (int)timestamp;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue