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:
parent
913f98b902
commit
0f59073400
1 changed files with 4 additions and 4 deletions
|
@ -1458,13 +1458,13 @@ int SrsHls::on_audio(SrsSharedPtrMessage* __audio)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// the pts calc from rtmp/flv header.
|
// the dts calc from rtmp/flv header.
|
||||||
int64_t pts = audio->timestamp * 90;
|
int64_t dts = audio->timestamp * 90;
|
||||||
|
|
||||||
// for pure audio, we need to update the stream dts also.
|
// 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);
|
srs_error("hls cache write audio failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue