[FFmpeg-devel] [PATCH 02/10] lavc: deprecate av_get_codec_tag_string()

Clément Bœsch u at pkh.me
Mon Mar 27 12:01:29 EEST 2017


On Mon, Mar 27, 2017 at 10:56:26AM +0200, Carl Eugen Hoyos wrote:
> 2017-03-27 10:52 GMT+02:00 Clément Bœsch <u at pkh.me>:
> > On Mon, Mar 27, 2017 at 10:47:55AM +0200, Carl Eugen Hoyos wrote:
> >> 2017-03-27 10:21 GMT+02:00 Clément Bœsch <u at pkh.me>:
> >> > On Mon, Mar 27, 2017 at 10:12:46AM +0200, Carl Eugen Hoyos wrote:
> >> >> 2017-03-27 10:09 GMT+02:00 Clément Bœsch <u at pkh.me>:
> >> >>
> >> >> >> > +attribute_deprecated
> >> >> >> >  size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
> >> >> >> > +#endif
> >> >> >>
> >> >> >> Sorry if I missed it:
> >> >> >> Please explain what the problem is with the current code.
> >> >> >
> >> >> > I can't make av_4cc2str() with that prototype. I take the opportunity to
> >> >> > move it to lavu since fourcc are related to format and codecs.
> >> >>
> >> >> What about moving av_get_codec_tag_string() to lavu if you need
> >> >> it there?
> >> >
> >> > Please also see my first sentence: I can't use av_get_codec_tag_string()
> >> > with its current prototype anyway.
> >>
> >> But could you explain why you cannot use it?
> >> (Sorry if it is obvious, I don't see it.)
> >>
> >
> > Because we want to be able to do print_func("%s", av_4cc2str(tag)) and
> > av_get_codec_tag_string() returns a size instead of the buffer.
> 
> Is the compiler doing anything stupid for the current code?
> 

No but it makes the code much simpler that way.

> >> Changing API is always a big problem that is typically underestimated
> >> by FFmpeg developers. Therefore every change should be discussed
> >> and avoided if possible (imo if somehow possible).
> >
> > I'm aware of that
> 
> Then why do you propose to deprecate a public function?
> (Or are you just aware of my opinion?)
> 

I'm aware it's a problem, but in the long term it's also an improvement
for both our codebase and our users.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170327/0ade0ce5/attachment.sig>


More information about the ffmpeg-devel mailing list