mirror of
https://github.com/androidx/media.git
synced 2025-05-11 17:49:52 +08:00
Fix DvbParser
handling of pageComposition = null
This `DvbParser` was updated to implement the new `SubtitleParser`
interface in 2261756d3a
.
This method used to return a `List<Cue>`, but now it returns a
`List<CuesWithTiming>`, which is closer to `List<List<Cue>>`. The
previous method returned an empty list, meaning a single 'event' with
no cues. After the change above the method still returns an empty list,
but that now means 'no events'. In order to maintain the old behaviour,
this change updates it to return a single-item list containing an empty
list of cues.
PiperOrigin-RevId: 557502261
This commit is contained in:
parent
a801f8d3f5
commit
d42c58f152
@ -139,7 +139,9 @@ public final class DvbParser implements SubtitleParser {
|
||||
|
||||
@Nullable PageComposition pageComposition = subtitleService.pageComposition;
|
||||
if (pageComposition == null) {
|
||||
return ImmutableList.of();
|
||||
return ImmutableList.of(
|
||||
new CuesWithTiming(
|
||||
ImmutableList.of(), /* startTimeUs= */ C.TIME_UNSET, /* durationUs= */ C.TIME_UNSET));
|
||||
}
|
||||
|
||||
// Update the canvas bitmap if necessary.
|
||||
|
Loading…
x
Reference in New Issue
Block a user