[FFmpeg-devel] [PATCH] lavc/bsf: add an Opus metadata bitstream filter

Nicolas George george at nsup.org
Tue May 5 12:02:45 EEST 2020


Andreas Rheinhardt (12020-05-05):
> > +static const AVOption opus_metadata_options[] = {
> > +    { "gain", "Gain, actual amplification is pow(10, gain/(20.0*256))", OFFSET(gain),
> > +      AV_OPT_TYPE_INT, { .i64 = 0 }, -(INT16_MAX + 1), INT16_MAX, .flags = FLAGS },
> > +
> > +    { NULL },
> > +};
> 
> You are using an AV_OPT_TYPE_INT parameter, yet the actual type of the
> destination is int64_t. This won't work on big endian systems. Make gain
> an int.

Or make it a float and multiply it by 256 or 5120 before giving it to
libopus, possibly.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200505/9e9bb374/attachment.sig>


More information about the ffmpeg-devel mailing list