[FFmpeg-devel] [PATCH 1/3] avutil/opt: add a note about the av_opt_set_chlayout() behavior
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon May 6 18:43:50 EEST 2024
James Almer:
> Based on the one for av_opt_set_dict_val().
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> libavutil/opt.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/libavutil/opt.h b/libavutil/opt.h
> index 2d76ec6105..1b30a32317 100644
> --- a/libavutil/opt.h
> +++ b/libavutil/opt.h
> @@ -797,6 +797,10 @@ int av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_
> int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags);
> int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags);
> int av_opt_set_video_rate(void *obj, const char *name, AVRational val, int search_flags);
> +/**
> + * @note Any old chlayout present is discarded and replaced with a copy of the new one. The
> + * caller still owns layout is and responsible for uninitializing it.
FFSWAP(is, and)
(Apart from this: The behaviour is clear from the fact that
av_opt_set_chlayout() accepts a pointer to const.)
> + */
> int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layout, int search_flags);
> /**
> * @note Any old dictionary present is discarded and replaced with a copy of the new one. The
More information about the ffmpeg-devel
mailing list