Fix Fmp4Extractor.init to use text transcoding ExtractorOutput

This was missed in da724c8cc4

I tried to write a test for this, but got stuck crafting valid test
data. I was able to create a new fragmented MP4 file containing only a
TTML track:

```shell
$ MP4Box -add simple.ttml -frag 2000 sample_fragmented_ttml.mp4
```

Then I tried naively removing the `ftyp` and `moov` boxes with a hex
editor, but using this in `FragmentedMp4ExtractorNoSniffingTest` gave
me an `EOFException` that I didn't get to the root cause of.

Issue: androidx/media#1779

#cherrypick

PiperOrigin-RevId: 683667850
This commit is contained in:
ibaker 2024-10-08 10:08:19 -07:00 committed by Copybara-Service
parent 72ab282c0d
commit 546d7da2f2
2 changed files with 4 additions and 1 deletions

View File

@ -128,6 +128,9 @@
* HLS Extension:
* DASH Extension:
* Smooth Streaming Extension:
* Fix a `Bad magic number for Bundle` error when playing SmoothStreaming
streams with text tracks
([#1779](https://github.com/androidx/media/issues/1779)).
* RTSP Extension:
* Fix user info removal for URLs that contain encoded @ characters
([#1138](https://github.com/androidx/media/pull/1138)).

View File

@ -448,7 +448,7 @@ public class FragmentedMp4Extractor implements Extractor {
if (sideloadedTrack != null) {
TrackBundle bundle =
new TrackBundle(
output.track(0, sideloadedTrack.type),
extractorOutput.track(0, sideloadedTrack.type),
new TrackSampleTable(
sideloadedTrack,
/* offsets= */ new long[0],