Quoting Gaullier Nicolas (2020-01-13 23:16:44) > >If the intention is to use this code from avformat_find_stream_info(), > >then why should it be public? The documentation is very unclear as to > >when/how an API user is supposed to call it. > > > >Anton Khirnov > > Sorry about that, I should have explained this in the cover letter, or maybe > even in the commit msg. > The reason is that this code already exists in ffmpeg.c (executed in case of > non-codec copy if I remember correctly) > and now I need it to be shared and used in avformat_find_stream_info also > (for probing in general, and for codec copy in particular) to avoid code > duplication. > The fact is that initially, I had regrouped all this refactoring in a single > commit, thus resulting in a clear full picture but it was not correct to mix > libav and fftools changes, so I split the commit but an explanation was > lacking, I missed that, sorry. > I propose to describe this in the commit msg, this should be enough as the > code/usage itself already exists in ffmpeg.c so maybe it is not necessary to > add public documentation.
The issue here is that adding a public function is kind of a big deal, since once it's there it's hard to change or remove it. It's not something to be done lightly. So every new public API function must have a well-defined purpose and use case. Since this function is not all that well-defined, and also very small and simple I think it's better to just duplicate it. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".