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

Signed-off-by: Philip DeCamp <decamp@mit.edu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 857fc0a71f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Philip DeCamp 2014-09-24 16:15:18 -04:00 committed by Michael Niedermayer
parent dc319a52f9
commit 9c61b44941
1 changed files with 1 additions and 1 deletions

View File

@ -566,7 +566,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;
}