avutil/opt: Fix types used to access AV_OPT_TYPE_PIXEL_FMT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a0640e6346)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-06 22:14:15 +01:00
parent 756d85dc14
commit 78c314e39e
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ static int read_number(const AVOption *o, const void *dst, double *num, int *den
{
switch (o->type) {
case AV_OPT_TYPE_FLAGS: *intnum = *(unsigned int*)dst;return 0;
case AV_OPT_TYPE_PIXEL_FMT:
case AV_OPT_TYPE_PIXEL_FMT: *intnum = *(enum AVPixelFormat *)dst;return 0;
case AV_OPT_TYPE_SAMPLE_FMT:
case AV_OPT_TYPE_INT: *intnum = *(int *)dst;return 0;
case AV_OPT_TYPE_CHANNEL_LAYOUT:
@ -100,8 +100,8 @@ static int write_number(void *obj, const AVOption *o, void *dst, double num, int
}
switch (o->type) {
case AV_OPT_TYPE_PIXEL_FMT: *(enum AVPixelFormat *)dst = llrint(num/den) * intnum; break;
case AV_OPT_TYPE_FLAGS:
case AV_OPT_TYPE_PIXEL_FMT:
case AV_OPT_TYPE_SAMPLE_FMT:
case AV_OPT_TYPE_INT: *(int *)dst= llrint(num/den)*intnum; break;
case AV_OPT_TYPE_DURATION: