49 value += strspn(value,
" \t");
54 db = strtol(value, &fraction, 0);
55 if (*fraction++ ==
'.') {
57 mb += scale * (*fraction -
'0');
63 if (abs(db) > (INT32_MAX - mb) / 100000)
66 return db * 100000 + sign * mb;
75 if (tg == INT32_MIN && ag == INT32_MIN)
100 sd->
size =
sizeof(*replaygain);
memory handling functions
static int32_t parse_value(const char *value, int32_t min)
int av_isdigit(int c)
Locale-independent conversion of ASCII isdigit.
AVPacketSideData * side_data
An array of side data that applies to the whole stream (i.e.
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
int nb_side_data
The number of elements in the AVStream.side_data array.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
int ff_replaygain_export(AVStream *st, AVDictionary *metadata)
Parse replaygain tags and export them as per-stream side data.
int32_t album_gain
Same as track_gain, but for the whole album.
enum AVPacketSideDataType type
This side data should be associated with an audio stream and contains ReplayGain information in form ...
int ff_replaygain_export_raw(AVStream *st, int32_t tg, uint32_t tp, int32_t ag, uint32_t ap)
Export already decoded replaygain values as per-stream side data.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
uint32_t album_peak
Same as track_peak, but for the whole album,.
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...