[FFmpeg-cvslog] avcodec/videotoolboxenc: fix align issue

Zhao Zhili git at videolan.org
Tue Sep 29 04:50:39 EEST 2020


ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Thu Aug 27 05:38:44 2020 +0800| [419d2524a8239a8f00b4c1702c91065b259615a2] | committer: Rick Kern

avcodec/videotoolboxenc: fix align issue

bool a53_cc is accessed as int:
src/libavutil/opt.c:129:9: runtime error: store to misaligned
address 0x7fbf454121a3 for type 'int', which requires 4 byte alignment

Signed-off-by: Rick Kern <kernrj at gmail.com>

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

 libavcodec/videotoolboxenc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index fe0c98300b..7c87b6865c 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -226,7 +226,9 @@ typedef struct VTEncContext {
     bool flushing;
     bool has_b_frames;
     bool warned_color_range;
-    bool a53_cc;
+
+    /* can't be bool type since AVOption will access it as int */
+    int a53_cc;
 } VTEncContext;
 
 static int vtenc_populate_extradata(AVCodecContext   *avctx,



More information about the ffmpeg-cvslog mailing list