Repository navigation
Expose interlace flags on FFmpeg video output buffers - #243
Merged
Merged
Conversation
anilbeesetti
force-pushed
the
chore/issue-241
branch
from
November 27, 2026 14:56
0dad618 to
ee47fc6
Compare
anilbeesetti
force-pushed
the
chore/issue-241
branch
from
November 27, 2026 14:57
ee47fc6 to
247edf0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Custom YUV renderers need per-frame field order to deinterlace FFmpeg output on the GPU. NextLib now carries the decoded frame’s interlace and top-field-first flags through JNI to
FfmpegVideoDecoderOutputBuffer. The flags describe the frame before rotation.Closes #241.
Evidence
FFmpeg previously passed a plain Media3 output buffer with no interlace metadata. The new MPEG-2 regression test verifies top-field-first, bottom-field-first, and progressive flags on the same reused YUV buffer.
22 unit tests and 39 Android instrumentation tests passed. Standalone video, AV1, TrueHD AddressSanitizer, and rotation checks passed.
An R8-minified consumer received all 160 expected YUV frames through ExoPlayer and verified each frame’s flags across synthetic 576-line MPEG-2 and 1080i H.264 streams.
Release AAR native packaging passed for all four ABIs.
After rebasing onto
main, the release build, unit tests, native packaging, and the interlace and Dolby Vision emulator regressions passed.Merge risk
Reversible. The change affects FFmpeg video output buffers and their JNI initialization. Playback verification used emulators and synthetic transport streams.
Reviewed with sol-loop in one round with GPT-6.2 Sol on medium. Verdict approved.
Created with GPT-6.2 Sol in Codex through T3 Code.