Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fa07e2a2 authored by Jeffrey Kardatzke's avatar Jeffrey Kardatzke
Browse files

Fix incorrect buffer size in NuPlayer

This was discovered from running GTS tests that were failing because the
DRM implementation was receiving media packets of incorrect sizes for
decryption. The problem is that it was copying content using the size of
the underlying MediaBuffer object rather than the range that was set in
it. That was leading to lots of trailing garbage in media packets.
Generally this was fine and decoders would ignore them, but recent
changes in decryption handling for AMD platforms exposed this problem.

The fix is very straightforward in that we should be using the
range_length rather than the size when copying them. This doesn't impact
non-DRM content as those buffer sizes appear to be correct already based
on testing.

Bug: b:268158584
Test: gts.MediaPlayerTest#testLLAMA_H264_BASELINE_240P_800_DOWNLOADED_V1_ASYNC
      no longer shows corruption on guybrush and packet sizes now match
      up as expected
Change-Id: I14eda495fa76621436b212f2bd3ae9f7093137fe
parent da8bab25
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment