[FFmpeg-devel] [PATCH 01/10] lavu: add av_fourcc_make_string() and av_4cc2str()

Tobias Rapp t.rapp at noa-archive.com
Wed Mar 29 09:30:12 EEST 2017

On 28.03.2017 10:19, Clément Bœsch wrote:
> On Tue, Mar 28, 2017 at 12:47:39AM +0200, Alexander Strasser wrote:
> [...]
>>> +
>>> +#define av_4cc2str(fourcc) av_fourcc_make_string((char[AV_FOURCC_MAX_STRING_SIZE]){0}, fourcc)
>> Did your write it as 4cc2str to make the name shorter?
>> I guess fourcc2str is more readable and more consistent.
> This is a shorthand, so yeah I wanted to keep it short. If you replace
> "4cc" with "fourcc", why not do that for the '2' as well? Writing "four"
> but keeping '2' was kind of weird to me :)

When grep'ing the source files it seems there are other "...2str" 
functions like av_ts2str and av_err2str. On the other hand the codec and 
(RIFF) chunk ids functions and variables use "fourcc" in 95% of the 
existing cases. Just my 2¢.


More information about the ffmpeg-devel mailing list