[FFmpeg-cvslog] libavutil/opt: fix av_opt_set_channel_layout() to access correct memory address

Philip DeCamp git at videolan.org
Fri Oct 3 03:47:48 CEST 2014


ffmpeg | branch: release/2.3 | Philip DeCamp <decamp at mit.edu> | Wed Sep 24 16:15:18 2014 -0400| [f913da3e15e09c7ec897206cde634b5d7b5162d4] | committer: Michael Niedermayer

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

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f913da3e15e09c7ec897206cde634b5d7b5162d4
---

 libavutil/opt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 694295d..4115484 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -631,7 +631,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;
 }
 



More information about the ffmpeg-cvslog mailing list