Skip to content

Commit

Permalink
refine code, rename the pts to dts although both ok for audio.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jan 22, 2015
1 parent 913f98b commit 0f59073
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trunk/src/app/srs_app_hls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0f59073

Please # to comment.