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

for #304, rewrite hls/ts code, support h.264+mp3 for hls. 2.0.117.

This commit is contained in:
winlin 2015-02-15 17:43:35 +08:00
parent 3c813847bd
commit 922150b2cf
8 changed files with 54 additions and 10 deletions

View file

@ -2916,13 +2916,12 @@ int SrsTsPayloadPMT::psi_encode(SrsStream* stream)
return ret;
}
SrsTSMuxer::SrsTSMuxer(SrsFileWriter* w)
SrsTSMuxer::SrsTSMuxer(SrsFileWriter* w, SrsCodecAudio ac)
{
writer = w;
context = NULL;
// default to aac.
acodec = SrsCodecAudioAAC;
acodec = ac;
// default to avc(h.264)
vcodec = SrsCodecVideoAVC;
}
@ -3296,7 +3295,7 @@ int SrsTsEncoder::initialize(SrsFileWriter* fs)
_fs = fs;
srs_freep(muxer);
muxer = new SrsTSMuxer(fs);
muxer = new SrsTSMuxer(fs, SrsCodecAudioAAC);
if ((ret = muxer->open("")) != ERROR_SUCCESS) {
return ret;