diff options
author | Martin Storsjö <martin@martin.st> | 2011-10-17 20:50:02 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-10-17 21:35:41 +0300 |
commit | 299234a0a9e7d96d4cfe7ec88aac007bf4a6bbff (patch) | |
tree | b6f8e5d7066944c18dd0f10448f4a303366b0c0c /libavutil | |
parent | 2e69dd66b6e47ba33f9bb6696e9c587d3057034c (diff) | |
download | ffmpeg-299234a0a9e7d96d4cfe7ec88aac007bf4a6bbff.tar.gz |
avoptions: Fix av_opt_flag_is_set
With the changes in 3b3ea34655db02d9cd9ea1a4122e920a7fdec602,
"Remove all uses of deprecated AVOptions API", av_opt_flag_is_set
was broken, since it now uses av_opt_find, which doesn't return
named constants unless a unit to look for the constant in is given.
This broke enabling LATM encapsulated AAC output in RTP.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/opt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index bf63bef2af..aa76301740 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -501,7 +501,8 @@ int av_opt_get_q(void *obj, const char *name, int search_flags, AVRational *out_ int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name) { const AVOption *field = av_opt_find(obj, field_name, NULL, 0, 0); - const AVOption *flag = av_opt_find(obj, flag_name, NULL, 0, 0); + const AVOption *flag = av_opt_find(obj, flag_name, + field ? field->unit : NULL, 0, 0); int64_t res; if (!field || !flag || flag->type != AV_OPT_TYPE_CONST || |