refine code, rename the pts to dts although both ok for audio.
正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -1458,13 +1458,13 @@ int SrsHls::on_audio(SrsSharedPtrMessage* __audio) | @@ -1458,13 +1458,13 @@ int SrsHls::on_audio(SrsSharedPtrMessage* __audio) | ||
| 1458 | return ret; | 1458 | return ret; |
| 1459 | } | 1459 | } |
| 1460 | 1460 | ||
| 1461 | - // the pts calc from rtmp/flv header. | ||
| 1462 | - int64_t pts = audio->timestamp * 90; | 1461 | + // the dts calc from rtmp/flv header. |
| 1462 | + int64_t dts = audio->timestamp * 90; | ||
| 1463 | 1463 | ||
| 1464 | // for pure audio, we need to update the stream dts also. | 1464 | // for pure audio, we need to update the stream dts also. |
| 1465 | - stream_dts = pts; | 1465 | + stream_dts = dts; |
| 1466 | 1466 | ||
| 1467 | - if ((ret = hls_cache->write_audio(codec, muxer, pts, sample)) != ERROR_SUCCESS) { | 1467 | + if ((ret = hls_cache->write_audio(codec, muxer, dts, sample)) != ERROR_SUCCESS) { |
| 1468 | srs_error("hls cache write audio failed. ret=%d", ret); | 1468 | srs_error("hls cache write audio failed. ret=%d", ret); |
| 1469 | return ret; | 1469 | return ret; |
| 1470 | } | 1470 | } |
-
请 注册 或 登录 后发表评论