[FFmpeg-devel] [PATCH] libavutil/dict: extend the list of convienience functions for storing different data types

wm4 nfxjfg at googlemail.com
Fri Sep 4 17:18:26 CEST 2015


On Fri, 4 Sep 2015 14:38:54 +0100
Kevin Wheatley <kevin.j.wheatley at gmail.com> wrote:

> Hi,
> 
> as part of adding support for non-string data types to .mov metadata,
> I wondered about adding the following helper functions for storing
> numeric types into an AVDictionary.
> 
> upfront I'll say I'm not 100% happy with the float32 and float64 named
> variants (vs float and double) as there is no clear preference in
> other areas of the code that I could see.

I don't understand it either. Why not just use float and double,
instead of obfuscating the names further? (It'd be a difference if this
function e.g. serialized the floats to binary - but it literally just
passes them as-is to libc. Having the C data type in the argument seems
advantageous.

Also, what's the use in having a float function at all?

I'd call av_dict_set_uint av_dict_set_uint64.

> I'm also conscious that to provide for rewriting the .mov metadata
> types, I'll need something different to store the actual types and
> that might mean these functions would end up not being used at all.
> 
> Kevin



More information about the ffmpeg-devel mailing list