mirror of
https://github.com/samsonjs/media.git
synced 2026-04-01 10:35:48 +00:00
Fix HLS' mime type propagation
Issue:#3653 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=182064250
This commit is contained in:
parent
a4114f59b6
commit
be304486e0
3 changed files with 13 additions and 2 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
### dev-v2 (not yet released) ###
|
||||
|
||||
* HLS: Fix mime type propagation
|
||||
([#3653](https://github.com/google/ExoPlayer/issues/3653)).
|
||||
* SimpleExoPlayerView: Automatically apply video rotation if
|
||||
`SimpleExoPlayerView` is configured to use `TextureView`
|
||||
([#91](https://github.com/google/ExoPlayer/issues/91)).
|
||||
|
|
|
|||
|
|
@ -474,8 +474,15 @@ public final class Format implements Parcelable {
|
|||
drmInitData, metadata);
|
||||
}
|
||||
|
||||
public Format copyWithContainerInfo(String id, String codecs, int bitrate, int width, int height,
|
||||
@C.SelectionFlags int selectionFlags, String language) {
|
||||
public Format copyWithContainerInfo(
|
||||
String id,
|
||||
String sampleMimeType,
|
||||
String codecs,
|
||||
int bitrate,
|
||||
int width,
|
||||
int height,
|
||||
@C.SelectionFlags int selectionFlags,
|
||||
String language) {
|
||||
return new Format(id, containerMimeType, sampleMimeType, codecs, bitrate, maxInputSize, width,
|
||||
height, frameRate, rotationDegrees, pixelWidthHeightRatio, projectionData, stereoMode,
|
||||
colorInfo, channelCount, sampleRate, pcmEncoding, encoderDelay, encoderPadding,
|
||||
|
|
|
|||
|
|
@ -882,8 +882,10 @@ import java.util.Arrays;
|
|||
int bitrate = propagateBitrate ? playlistFormat.bitrate : Format.NO_VALUE;
|
||||
int sampleTrackType = MimeTypes.getTrackType(sampleFormat.sampleMimeType);
|
||||
String codecs = Util.getCodecsOfType(playlistFormat.codecs, sampleTrackType);
|
||||
String mimeType = MimeTypes.getMediaMimeType(codecs);
|
||||
return sampleFormat.copyWithContainerInfo(
|
||||
playlistFormat.id,
|
||||
mimeType,
|
||||
codecs,
|
||||
bitrate,
|
||||
playlistFormat.width,
|
||||
|
|
|
|||
Loading…
Reference in a new issue