[FFmpeg-devel] [PATCH] avformat/utils: add helper functions to retrieve index entries from an AVStream

Nicolas George george at nsup.org
Thu Apr 1 17:29:32 EEST 2021


James Almer (12021-04-01):
> Pos doesn't seem like it would be useful outside of the internal seeking
> methods, size seems to be the least useful of them all

pos and size seem very useful to me for an application that wants to
make quick graphs of (time, bitrate).

As a general rule "foobar does not seem useful for users" is usually a
lack of imagination from the developer.

> So instead of making a new struct, or build a second array internally, we
> could maybe just return those two fields?

Why do you want to complicate things? Just return the darn pointer and
trust the users to use it properly to access the fields they need,
without speculating.

Regards,

-- 
  Nicolas George


More information about the ffmpeg-devel mailing list