libavutil/opt: fix av_opt_set_channel_layout() to access correct memory address
authorPhilip DeCamp <decamp@mit.edu>
Wed, 24 Sep 2014 20:15:18 +0000 (16:15 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Sep 2014 20:57:40 +0000 (22:57 +0200)
Signed-off-by: Philip DeCamp <decamp@mit.edu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/opt.c

index ca4edb8..ee72a96 100644 (file)
@@ -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;
 }