Commit 857fc0a7 authored by Philip DeCamp's avatar Philip DeCamp Committed by Michael Niedermayer

libavutil/opt: fix av_opt_set_channel_layout() to access correct memory address

Signed-off-by: 's avatarPhilip DeCamp <decamp@mit.edu>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 70277d1d
......@@ -627,7 +627,7 @@ int av_opt_set_channel_layout(void *obj, const char *name, int64_t cl, int searc
"The value set by option '%s' is not a channel layout.\n", o->name);
return AVERROR(EINVAL);
}
*(int *)(((int64_t *)target_obj) + o->offset) = cl;
*(int64_t *)(((uint8_t *)target_obj) + o->offset) = cl;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment