H264Reader: Add missing propagation of max_num_reorder_frames

This method is already called below in the
`else if (sps.isCompleted())` block which applies when
`hasOutputFormat == true`, but this is only ever entered if we are
parsing SPS and PPS NAL units **after** we've emitted a format, which
is only the case if
`DefaultTsPayloadReaderFactory.FLAG_DETECT_ACCESS_UNITS` is set (which
it isn't by default).

The equivalent call in `H265Reader` is already inside the
`if (!hasOutputFormat)` block, so doesn't need a similar fix.

#cherrypick

PiperOrigin-RevId: 689809529
This commit is contained in:
ibaker 2024-10-25 09:10:29 -07:00 committed by Copybara-Service
parent a15571c8ee
commit 39c734963f
2 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,9 @@
* Audio:
* Video:
* Text:
* Fix CEA-608 subtitles in H.264 MPEG-TS streams not being output (this
was broken in `1.5.0-alpha01` by
https://github.com/androidx/media/commit/03a205f220ecf7681f85f8a752227e3986e257ff).
* Metadata:
* Image:
* DRM:

View File

@ -233,6 +233,7 @@ public final class H264Reader implements ElementaryStreamReader {
.setMaxNumReorderSamples(spsData.maxNumReorderFrames)
.build());
hasOutputFormat = true;
seiReader.setReorderingQueueSize(spsData.maxNumReorderFrames);
sampleReader.putSps(spsData);
sampleReader.putPps(ppsData);
sps.reset();