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

for bug #251, the shared ptr message share the header. 2.0.64

This commit is contained in:
winlin 2014-12-07 11:25:05 +08:00
parent 330819fb74
commit bba6063492
11 changed files with 313 additions and 125 deletions

View file

@ -1458,7 +1458,7 @@ int SrsHls::on_audio(SrsSharedPtrMessage* __audio)
}
// the pts calc from rtmp/flv header.
int64_t pts = audio->header.timestamp * 90;
int64_t pts = audio->timestamp * 90;
// for pure audio, we need to update the stream dts also.
stream_dts = pts;
@ -1503,7 +1503,7 @@ int SrsHls::on_video(SrsSharedPtrMessage* __video)
return ret;
}
int64_t dts = video->header.timestamp * 90;
int64_t dts = video->timestamp * 90;
stream_dts = dts;
if ((ret = hls_cache->write_video(codec, muxer, dts, sample)) != ERROR_SUCCESS) {
srs_error("hls cache write video failed. ret=%d", ret);