On Tue, Sep 02, 2025 at 08:03:14AM +0200, Manuel Lauss via ffmpeg-devel wrote:
> Hello,
> 
> Is it possible to have a "sub" context with a limited byte range for a
> super-context?
> i.e. I read 4 bytes from context c1, these are a length, c2 =
> GetByteContext_from(c1, len) ?  Or is "GetByteContext(&c2, c1.buffer,
> len);" enough?

second one is what I do:
    bytestream2_init(&c2, c1.buffer, len)

also need to check that that len does not exceed c1 bytes remaining. use 
bytestream2_get_bytes_left(c1).

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-le...@ffmpeg.org

Reply via email to