You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Play SmoothStreaming media with subtitles in demo application.
Problem exists only in case of extraction phase subtitle parsing path - which is now default.
SmoothStreaming media source (DefaultSsChunkSource) uses FragmentedMp4Extractor with non-null sideloadedTrack which seems to be incorrecly handled in FragmentedMp4Extractor.init() which in turn causes subtitles to be decoded by CueDecoder without being first encoded.
Following change causes stream to play correctly:
diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java
--- a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java
+++ b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java (date 1728030664226)
@@ -417,7 +417,7 @@
if (sideloadedTrack != null) {
TrackBundle bundle =
new TrackBundle(
- output.track(0, sideloadedTrack.type),
+ extractorOutput.track(0, sideloadedTrack.type),
new TrackSampleTable(
sideloadedTrack,
/* offsets= */ new long[0],
Expected result
Media plays with subtitles rendered
Actual result
Playback error with following exception:
playerFailed [eventTime=1.12, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_FAILED_RUNTIME_CHECK
androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:720)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalStateException: Bad magic number for Bundle: 0x6576206c
at android.os.BaseBundle.readFromParcelInner(BaseBundle.java:1659)
at android.os.BaseBundle.<init>(BaseBundle.java:143)
at android.os.Bundle.<init>(Bundle.java:96)
at android.os.Parcel.readBundle(Parcel.java:2658)
at androidx.media3.extractor.text.CueDecoder.decode(CueDecoder.java:63)
at androidx.media3.exoplayer.text.TextRenderer.readAndDecodeCuesWithTiming(TextRenderer.java:336)
at androidx.media3.exoplayer.text.TextRenderer.renderFromCuesWithTiming(TextRenderer.java:295)
at androidx.media3.exoplayer.text.TextRenderer.render(TextRenderer.java:263)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1136)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:561)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
Version
Media3 1.4.1
More version details
No response
Devices that reproduce the issue
AndroidTV STB with AndroidTV 12
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
Play SmoothStreaming media with subtitles in demo application.
Problem exists only in case of extraction phase subtitle parsing path - which is now default.
SmoothStreaming media source (
DefaultSsChunkSource
) usesFragmentedMp4Extractor
with non-nullsideloadedTrack
which seems to be incorrecly handled inFragmentedMp4Extractor.init()
which in turn causes subtitles to be decoded byCueDecoder
without being first encoded.Following change causes stream to play correctly:
Expected result
Media plays with subtitles rendered
Actual result
Playback error with following exception:
Media
https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-multiple-subtitles.ism/Manifest
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: