Skip to content

Commit

Permalink
Added support for AAC-MAIN in mp42ts
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Feb 13, 2015
1 parent 31edce6 commit 26f87bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/C++/Core/Ap4Mpeg2Ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,10 @@ AP4_Mpeg2TsAudioSampleStream::WriteSample(AP4_Sample& sample,
if (sample_description->GetFormat() == AP4_SAMPLE_FORMAT_MP4A) {
AP4_MpegAudioSampleDescription* audio_desc = AP4_DYNAMIC_CAST(AP4_MpegAudioSampleDescription, sample_description);
if (audio_desc == NULL) return AP4_ERROR_NOT_SUPPORTED;
if (audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_AAC_LC) return AP4_ERROR_NOT_SUPPORTED;
if (audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_AAC_LC &&
audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_AAC_MAIN) {
return AP4_ERROR_NOT_SUPPORTED;
}

unsigned int sample_rate = audio_desc->GetSampleRate();
unsigned int channel_count = audio_desc->GetChannelCount();
Expand Down

0 comments on commit 26f87bf

Please sign in to comment.