-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
In this section:
H264Sharp/H264Sharp/H264Decoder.cs
Lines 188 to 190 in 26d9442
| fixed (byte* P = &encoded[offset]) | |
| { | |
| int success = native.DecodeAsYUV(decoder, ref P[offset], count, noDelay, ref state_, ref yuv); |
There is both:
byte* P = &encoded[offset]
and then using that below:
native.DecodeAsYUV(decoder, ref P[offset], ...
Causing a sort of double offset.
This means if you have an array that is needs to offset, you're forced to do a copy to avoid using Decode with an offset. For instance if I have a byte array of size 800, and the first 8 bytes are some other part of the stream, I have to slice and copy from 8 to length - 8 to pass into decode to avoid this issue, because effectively decode will try to work with bytes 16 to length + 8 causing the encoder to fail.
Metadata
Metadata
Assignees
Labels
No labels