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

refine code, rename the pts to dts although both ok for audio.

This commit is contained in:
winlin 2015-01-22 17:35:07 +08:00
parent 913f98b902
commit 0f59073400

View file

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