Skip to content

Conversation

@mattleibow
Copy link
Contributor

@mattleibow mattleibow commented Sep 29, 2022

Description of Change

Make sure to allow reads to a null buffer as that is how skia does skips.

Bugs Fixed

API Changes

None.

Behavioral Changes

None.

Required skia PR

None.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Merged related skia PRs
  • Changes adhere to coding standard
  • Updated documentation

Comment on lines +96 to 98
// NOTE: some skips still requires a read as some streams cannot seek
using var managedBuffer = Utils.RentArray<byte> ((int)size);
var len = stream.Read (managedBuffer.Array, 0, managedBuffer.Length);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not perfect, but I will fix this in a separate PR. The annoying thing is that some streams like and say they are seekable but are not or they allow seeking past the end of the stream causing other issues...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants