Message ID | 20240506152704.1596-1-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/3] avutil/opt: add a note about the av_opt_set_chlayout() behavior | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
James Almer: > Based on the one for av_opt_set_dict_val(). > > Signed-off-by: James Almer <jamrial@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
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. + */ 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
Based on the one for av_opt_set_dict_val(). Signed-off-by: James Almer <jamrial@gmail.com> --- libavutil/opt.h | 4 ++++ 1 file changed, 4 insertions(+)