[FFmpeg-devel] [PATCH] avcodec: Allow to query number of consumed bytes using the new API
george at nsup.org
Wed Jan 30 19:19:37 EET 2019
James Almer (12019-01-30):
> compat_decode_consumed doesn't look to have any significance when using
> the new API. It's working as an accumulator for all bytes consumed from
> all frames and it's never cleared (sounds like a potential overflow for
> that matter in long lasting decoding scenarios like streaming), whereas
> for the old API it's effectively keeping track of bytes consumed in one
> frame, and cleared after every avcodec_decode_* call. So I guess that's
> why you're clearing it here even though this function should by no means
> do that.
> Clearing compat_decode_consumed for the new API should be done somewhere
> in decode.c where it doesn't break the logic for the old API, regardless
> of using the AVCodec.decode() or AVCodec.receive_frame() callbacks.
I have reservations about adding an API to query something that is
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the ffmpeg-devel