[FFmpeg-devel] [PATCH 2/9] lavu/opt: introduce av_opt_serialize()

Lukasz Marek lukasz.m.luki2 at gmail.com
Tue Nov 18 17:14:32 CET 2014


On 18 November 2014 17:06, Stefano Sabatini <stefasab at gmail.com> wrote:

> > >>+            av_bprint_finalize(&bprint, NULL);
> > >>+            return ret;
> > >>+        }
> > >
> > >This will print alias options as well. This was my solution:
> >
>
> > I'm not sure it is always safe. Options with the same offset may
> > have different opt_flags and different defaults.
>
> I think this would be a bug, since for example set_defaults with set
> only the value of the last specified option. Do you have examples for
> this?


static const AVOption avcodec_options[] = {
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 =
AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E},
{"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64
= 128*1000 }, 0, INT_MAX, A|E},


More information about the ffmpeg-devel mailing list