mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
* MP3: Fix bug for TS or HLS with mp3 codec. v4.0.269 (#296) 1. Refresh HLS audio codec if changed in stream. 2. Refresh TS audio codec if changed in stream. 3. Fix mp3 demux bug in SrsFormat::audio_mp3_demux. 4. Use 3(MPEG1) not 4(MPEG2) as PMT stream type, follow FFmpeg. 5. MP3: Update utest for mp3 sample parsing. 6. MP3: Ignore empty frame sample. 7. UTest: Fix utest failed, do not copy files.
This commit is contained in:
parent
2573a25101
commit
577cd299e1
10 changed files with 109 additions and 38 deletions
|
@ -97,7 +97,7 @@ enum SrsTsPidApply
|
|||
SrsTsPidApplyAudio, // vor audio
|
||||
};
|
||||
|
||||
// Table 2-29 - Stream type assignments
|
||||
// Table 2-29 - Stream type assignments, hls-mpeg-ts-iso13818-1.pdf, page 66
|
||||
enum SrsTsStream
|
||||
{
|
||||
// ITU-T | ISO/IEC Reserved
|
||||
|
@ -106,8 +106,8 @@ enum SrsTsStream
|
|||
// ISO/IEC 11172 Video
|
||||
// ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream
|
||||
// ISO/IEC 11172 Audio
|
||||
SrsTsStreamAudioMp3 = 0x03,
|
||||
// ISO/IEC 13818-3 Audio
|
||||
SrsTsStreamAudioMp3 = 0x04,
|
||||
// ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections
|
||||
// ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data
|
||||
// ISO/IEC 13522 MHEG
|
||||
|
@ -1243,7 +1243,7 @@ private:
|
|||
// User must config the codec in right way.
|
||||
// @see https://github.com/ossrs/srs/issues/301
|
||||
SrsVideoCodecId vcodec;
|
||||
SrsAudioCodecId acodec;
|
||||
SrsAudioCodecId acodec_;
|
||||
private:
|
||||
SrsTsContext* context;
|
||||
ISrsStreamWriter* writer;
|
||||
|
@ -1259,6 +1259,10 @@ public:
|
|||
public:
|
||||
// get the video codec of ts muxer.
|
||||
virtual SrsVideoCodecId video_codec();
|
||||
public:
|
||||
// Get and set the audio codec.
|
||||
SrsAudioCodecId acodec();
|
||||
void set_acodec(SrsAudioCodecId v);
|
||||
};
|
||||
|
||||
// Used for HLS Encryption
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue