mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
lavu/opt: add AV_OPT_FLAG_DEPRECATED
This commit is contained in:
parent
71fa82bed6
commit
5be0410cb3
4 changed files with 11 additions and 1 deletions
|
|
@ -463,6 +463,9 @@ int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
|
|||
if (o->flags & AV_OPT_FLAG_READONLY)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
if (o->flags & AV_OPT_FLAG_DEPRECATED)
|
||||
av_log(obj, AV_LOG_WARNING, "The \"%s\" option is deprecated: %s\n", name, o->help);
|
||||
|
||||
dst = ((uint8_t *)target_obj) + o->offset;
|
||||
switch (o->type) {
|
||||
case AV_OPT_TYPE_BOOL:
|
||||
|
|
@ -759,6 +762,9 @@ int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val)
|
|||
if (!o || !target_obj || (o->offset<=0 && o->type != AV_OPT_TYPE_CONST))
|
||||
return AVERROR_OPTION_NOT_FOUND;
|
||||
|
||||
if (o->flags & AV_OPT_FLAG_DEPRECATED)
|
||||
av_log(obj, AV_LOG_WARNING, "The \"%s\" option is deprecated: %s\n", name, o->help);
|
||||
|
||||
dst = (uint8_t *)target_obj + o->offset;
|
||||
|
||||
buf[0] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue