mirror of https://git.ffmpeg.org/ffmpeg.git
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)
|
if (!o || !target_obj)
|
||||||
return AVERROR_OPTION_NOT_FOUND;
|
return AVERROR_OPTION_NOT_FOUND;
|
||||||
|
if (o->flags & AV_OPT_FLAG_READONLY)
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
dst = (AVChannelLayout*)((uint8_t*)target_obj + o->offset);
|
dst = (AVChannelLayout*)((uint8_t*)target_obj + o->offset);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue