You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avoptions: Fix av_opt_flag_is_set
With the changes in 3b3ea34655
,
"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>
This commit is contained in:
@@ -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)
|
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 *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;
|
int64_t res;
|
||||||
|
|
||||||
if (!field || !flag || flag->type != AV_OPT_TYPE_CONST ||
|
if (!field || !flag || flag->type != AV_OPT_TYPE_CONST ||
|
||||||
|
Reference in New Issue
Block a user