diff --git a/packager/app/test/testdata/acc-he/bear-640x360-aac_he-silent_right-audio.mp4 b/packager/app/test/testdata/acc-he/bear-640x360-aac_he-silent_right-audio.mp4 index 1bc42a7c78..3cb2dcdf44 100644 Binary files a/packager/app/test/testdata/acc-he/bear-640x360-aac_he-silent_right-audio.mp4 and b/packager/app/test/testdata/acc-he/bear-640x360-aac_he-silent_right-audio.mp4 differ diff --git a/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-audio.mp4 b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-audio.mp4 index a68f12768a..a66d3bfd1a 100644 Binary files a/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-audio.mp4 and b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-audio.mp4 b/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-audio.mp4 index a68f12768a..a66d3bfd1a 100644 Binary files a/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-audio.mp4 and b/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/audio-video-with-trick-play/bear-640x360-audio.mp4 b/packager/app/test/testdata/audio-video-with-trick-play/bear-640x360-audio.mp4 index d58886f965..1cc7fbb5f5 100644 Binary files a/packager/app/test/testdata/audio-video-with-trick-play/bear-640x360-audio.mp4 and b/packager/app/test/testdata/audio-video-with-trick-play/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/audio-video-with-two-trick-play/bear-640x360-audio.mp4 b/packager/app/test/testdata/audio-video-with-two-trick-play/bear-640x360-audio.mp4 index d58886f965..1cc7fbb5f5 100644 Binary files a/packager/app/test/testdata/audio-video-with-two-trick-play/bear-640x360-audio.mp4 and b/packager/app/test/testdata/audio-video-with-two-trick-play/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/audio-video/bear-640x360-audio.mp4 b/packager/app/test/testdata/audio-video/bear-640x360-audio.mp4 index d58886f965..1cc7fbb5f5 100644 Binary files a/packager/app/test/testdata/audio-video/bear-640x360-audio.mp4 and b/packager/app/test/testdata/audio-video/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/bear-640x360-a-cbcs-golden.mp4 b/packager/app/test/testdata/bear-640x360-a-cbcs-golden.mp4 index 64128ea454..2f2a91d12d 100644 Binary files a/packager/app/test/testdata/bear-640x360-a-cbcs-golden.mp4 and b/packager/app/test/testdata/bear-640x360-a-cbcs-golden.mp4 differ diff --git a/packager/app/test/testdata/bear-640x360-a-cenc-golden.mp4 b/packager/app/test/testdata/bear-640x360-a-cenc-golden.mp4 index 46e073eefe..afaf9595fb 100644 Binary files a/packager/app/test/testdata/bear-640x360-a-cenc-golden.mp4 and b/packager/app/test/testdata/bear-640x360-a-cenc-golden.mp4 differ diff --git a/packager/app/test/testdata/bear-640x360-a-demuxed-golden.mp4 b/packager/app/test/testdata/bear-640x360-a-demuxed-golden.mp4 index d58886f965..1cc7fbb5f5 100644 Binary files a/packager/app/test/testdata/bear-640x360-a-demuxed-golden.mp4 and b/packager/app/test/testdata/bear-640x360-a-demuxed-golden.mp4 differ diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-golden-init.mp4 b/packager/app/test/testdata/bear-640x360-a-live-cenc-golden-init.mp4 index 3292cd0e8d..7130994633 100644 Binary files a/packager/app/test/testdata/bear-640x360-a-live-cenc-golden-init.mp4 and b/packager/app/test/testdata/bear-640x360-a-live-cenc-golden-init.mp4 differ diff --git a/packager/app/test/testdata/dash-with-bandwidth-override/bear-640x360-audio.mp4 b/packager/app/test/testdata/dash-with-bandwidth-override/bear-640x360-audio.mp4 index d58886f965..1cc7fbb5f5 100644 Binary files a/packager/app/test/testdata/dash-with-bandwidth-override/bear-640x360-audio.mp4 and b/packager/app/test/testdata/dash-with-bandwidth-override/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-audio.mp4 index 6df0ec5ab9..23bb6c742c 100644 Binary files a/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-and-no-clear-lead/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-and-no-clear-lead/bear-640x360-audio.mp4 index fd6baf5aa9..ea6d9b5bb0 100644 Binary files a/packager/app/test/testdata/encryption-and-no-clear-lead/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-and-no-clear-lead/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-and-no-pssh-in-stream/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-and-no-pssh-in-stream/bear-640x360-audio.mp4 index 8da4e3efaf..9291a9d97a 100644 Binary files a/packager/app/test/testdata/encryption-and-no-pssh-in-stream/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-and-no-pssh-in-stream/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-and-output-media-info/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-and-output-media-info/bear-640x360-audio.mp4 index 46e073eefe..afaf9595fb 100644 Binary files a/packager/app/test/testdata/encryption-and-output-media-info/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-and-output-media-info/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-and-trick-play/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-and-trick-play/bear-640x360-audio.mp4 index 46e073eefe..afaf9595fb 100644 Binary files a/packager/app/test/testdata/encryption-and-trick-play/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-and-trick-play/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-and-two-trick-plays/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-and-two-trick-plays/bear-640x360-audio.mp4 index 46e073eefe..afaf9595fb 100644 Binary files a/packager/app/test/testdata/encryption-and-two-trick-plays/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-and-two-trick-plays/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-cbc-1/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-cbc-1/bear-640x360-audio.mp4 index afd156b3f3..fc019bf12e 100644 Binary files a/packager/app/test/testdata/encryption-cbc-1/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-cbc-1/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-cens/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-cens/bear-640x360-audio.mp4 index e3e3ee5d8a..587a1291d8 100644 Binary files a/packager/app/test/testdata/encryption-cens/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-cens/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-multi-keys-with-stream-label/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-multi-keys-with-stream-label/bear-640x360-audio.mp4 index 8fba916687..4d4ba6c5e9 100644 Binary files a/packager/app/test/testdata/encryption-multi-keys-with-stream-label/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-multi-keys-with-stream-label/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-multi-keys/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-multi-keys/bear-640x360-audio.mp4 index 6d4bd53694..c372dd5815 100644 Binary files a/packager/app/test/testdata/encryption-multi-keys/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-multi-keys/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption-of-only-video-stream/bear-640x360-audio-skip_encryption.mp4 b/packager/app/test/testdata/encryption-of-only-video-stream/bear-640x360-audio-skip_encryption.mp4 index d58886f965..1cc7fbb5f5 100644 Binary files a/packager/app/test/testdata/encryption-of-only-video-stream/bear-640x360-audio-skip_encryption.mp4 and b/packager/app/test/testdata/encryption-of-only-video-stream/bear-640x360-audio-skip_encryption.mp4 differ diff --git a/packager/app/test/testdata/encryption-using-fixed-key/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption-using-fixed-key/bear-640x360-audio.mp4 index 46e073eefe..afaf9595fb 100644 Binary files a/packager/app/test/testdata/encryption-using-fixed-key/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption-using-fixed-key/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/encryption/bear-640x360-audio.mp4 b/packager/app/test/testdata/encryption/bear-640x360-audio.mp4 index 46e073eefe..afaf9595fb 100644 Binary files a/packager/app/test/testdata/encryption/bear-640x360-audio.mp4 and b/packager/app/test/testdata/encryption/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-init.mp4 index f725c309e7..8f7a647e00 100644 Binary files a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/hls-multi-segment-mp4-with-custom-path/audio/audio-init.mp4 b/packager/app/test/testdata/hls-multi-segment-mp4-with-custom-path/audio/audio-init.mp4 index f725c309e7..8f7a647e00 100644 Binary files a/packager/app/test/testdata/hls-multi-segment-mp4-with-custom-path/audio/audio-init.mp4 and b/packager/app/test/testdata/hls-multi-segment-mp4-with-custom-path/audio/audio-init.mp4 differ diff --git a/packager/app/test/testdata/hls-segmented-webvtt/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/hls-segmented-webvtt/bear-640x360-audio-init.mp4 index f725c309e7..8f7a647e00 100644 Binary files a/packager/app/test/testdata/hls-segmented-webvtt/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/hls-segmented-webvtt/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/hls-single-segment-mp4-encrypted-and-ad-cues/bear-640x360-audio.mp4 b/packager/app/test/testdata/hls-single-segment-mp4-encrypted-and-ad-cues/bear-640x360-audio.mp4 index 6df0ec5ab9..23bb6c742c 100644 Binary files a/packager/app/test/testdata/hls-single-segment-mp4-encrypted-and-ad-cues/bear-640x360-audio.mp4 and b/packager/app/test/testdata/hls-single-segment-mp4-encrypted-and-ad-cues/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/hls-single-segment-mp4-encrypted/bear-640x360-audio.mp4 b/packager/app/test/testdata/hls-single-segment-mp4-encrypted/bear-640x360-audio.mp4 index 46e073eefe..afaf9595fb 100644 Binary files a/packager/app/test/testdata/hls-single-segment-mp4-encrypted/bear-640x360-audio.mp4 and b/packager/app/test/testdata/hls-single-segment-mp4-encrypted/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/hls-with-bandwidth-override/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/hls-with-bandwidth-override/bear-640x360-audio-init.mp4 index f725c309e7..8f7a647e00 100644 Binary files a/packager/app/test/testdata/hls-with-bandwidth-override/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/hls-with-bandwidth-override/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/bear-640x360-audio-init.mp4 index 3292cd0e8d..7130994633 100644 Binary files a/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile-and-encryption/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/live-profile-and-encryption/bear-640x360-audio-init.mp4 index 3292cd0e8d..7130994633 100644 Binary files a/packager/app/test/testdata/live-profile-and-encryption/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/live-profile-and-encryption/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/bear-640x360-audio-init.mp4 index fd20d26f61..1556766b65 100644 Binary files a/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/bear-640x360-audio-init.mp4 index fd20d26f61..1556766b65 100644 Binary files a/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation/bear-640x360-audio-init.mp4 index fd20d26f61..1556766b65 100644 Binary files a/packager/app/test/testdata/live-profile-and-key-rotation/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/live-profile-and-key-rotation/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/live-profile/bear-640x360-audio-init.mp4 index f725c309e7..8f7a647e00 100644 Binary files a/packager/app/test/testdata/live-profile/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/live-profile/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-static-profile-and-ad-cues/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/live-static-profile-and-ad-cues/bear-640x360-audio-init.mp4 index f725c309e7..8f7a647e00 100644 Binary files a/packager/app/test/testdata/live-static-profile-and-ad-cues/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/live-static-profile-and-ad-cues/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-static-profile/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/live-static-profile/bear-640x360-audio-init.mp4 index f725c309e7..8f7a647e00 100644 Binary files a/packager/app/test/testdata/live-static-profile/bear-640x360-audio-init.mp4 and b/packager/app/test/testdata/live-static-profile/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/video-audio-text/bear-640x360-audio.mp4 b/packager/app/test/testdata/video-audio-text/bear-640x360-audio.mp4 index d58886f965..1cc7fbb5f5 100644 Binary files a/packager/app/test/testdata/video-audio-text/bear-640x360-audio.mp4 and b/packager/app/test/testdata/video-audio-text/bear-640x360-audio.mp4 differ diff --git a/packager/media/formats/mp4/mp4_media_parser.cc b/packager/media/formats/mp4/mp4_media_parser.cc index e82c492c2d..4358853d29 100644 --- a/packager/media/formats/mp4/mp4_media_parser.cc +++ b/packager/media/formats/mp4/mp4_media_parser.cc @@ -392,8 +392,19 @@ bool MP4MediaParser::ParseMoov(BoxReader* reader) { switch (actual_format) { case FOURCC_mp4a: + max_bitrate = entry.esds.es_descriptor.max_bitrate(); + avg_bitrate = entry.esds.es_descriptor.avg_bitrate(); + codec = ObjectTypeToCodec(entry.esds.es_descriptor.object_type()); - if (codec == kUnknownCodec) { + if (codec == kCodecAAC) { + const AACAudioSpecificConfig& aac_audio_specific_config = + entry.esds.aac_audio_specific_config; + num_channels = aac_audio_specific_config.GetNumChannels(); + sampling_frequency = + aac_audio_specific_config.GetSamplesPerSecond(); + audio_object_type = aac_audio_specific_config.GetAudioObjectType(); + codec_config = entry.esds.es_descriptor.decoder_specific_info(); + } else if (codec == kUnknownCodec) { // Intentionally not to fail in the parser as there may be multiple // streams in the source content, which allows the supported stream // to be packaged. An error will be returned if the unsupported @@ -402,17 +413,6 @@ bool MP4MediaParser::ParseMoov(BoxReader* reader) { << static_cast( entry.esds.es_descriptor.object_type()) << " in stsd.es_desriptor."; - } else if (codec == kCodecAAC) { - const AACAudioSpecificConfig& aac_audio_specific_config = - entry.esds.aac_audio_specific_config; - num_channels = aac_audio_specific_config.GetNumChannels(); - sampling_frequency = - aac_audio_specific_config.GetSamplesPerSecond(); - audio_object_type = aac_audio_specific_config.GetAudioObjectType(); - codec_config = entry.esds.es_descriptor.decoder_specific_info(); - } else { - max_bitrate = entry.esds.es_descriptor.max_bitrate(); - avg_bitrate = entry.esds.es_descriptor.avg_bitrate(); } break; case FOURCC_dtsc: