Commit 851ca20c by samrobinson Committed by kim-vde

Add support for mp2 boxes.

Issue: #7967
PiperOrigin-RevId: 333709003
parent 00665864
......@@ -19,6 +19,9 @@
* Add support for `\h` SSA/ASS style override code (non-breaking space).
* Audio:
* Retry playback after some types of `AudioTrack` error.
* Extractors:
* Add support for .mp2 boxes in the `AtomParsers`
([#7967](https://github.com/google/ExoPlayer/issues/7967)).
### 2.12.0 (2020-09-11) ###
......
......@@ -116,6 +116,9 @@ import java.util.List;
public static final int TYPE_mp4a = 0x6d703461;
@SuppressWarnings("ConstantCaseForConstants")
public static final int TYPE__mp2 = 0x2e6d7032;
@SuppressWarnings("ConstantCaseForConstants")
public static final int TYPE__mp3 = 0x2e6d7033;
@SuppressWarnings("ConstantCaseForConstants")
......
......@@ -878,6 +878,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|| childAtomType == Atom.TYPE_lpcm
|| childAtomType == Atom.TYPE_sowt
|| childAtomType == Atom.TYPE_twos
|| childAtomType == Atom.TYPE__mp2
|| childAtomType == Atom.TYPE__mp3
|| childAtomType == Atom.TYPE_alac
|| childAtomType == Atom.TYPE_alaw
......@@ -1243,7 +1244,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
} else if (atomType == Atom.TYPE_twos) {
mimeType = MimeTypes.AUDIO_RAW;
pcmEncoding = C.ENCODING_PCM_16BIT_BIG_ENDIAN;
} else if (atomType == Atom.TYPE__mp3) {
} else if (atomType == Atom.TYPE__mp2 || atomType == Atom.TYPE__mp3) {
mimeType = MimeTypes.AUDIO_MPEG;
} else if (atomType == Atom.TYPE_alac) {
mimeType = MimeTypes.AUDIO_ALAC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment