mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avutil/opt: don't set a channel layout if the option is flagged as read only
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
2987c65caa
commit
9614efc258
@ -949,6 +949,8 @@ int av_opt_set_chlayout(void *obj, const char *name,
|
||||
|
||||
if (!o || !target_obj)
|
||||
return AVERROR_OPTION_NOT_FOUND;
|
||||
if (o->flags & AV_OPT_FLAG_READONLY)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
dst = (AVChannelLayout*)((uint8_t*)target_obj + o->offset);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user