]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/videotoolboxenc: fix align issue
authorZhao Zhili <zhilizhao@tencent.com>
Wed, 26 Aug 2020 21:38:44 +0000 (05:38 +0800)
committerRick Kern <kernrj@gmail.com>
Tue, 29 Sep 2020 01:45:54 +0000 (21:45 -0400)
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@gmail.com>
libavcodec/videotoolboxenc.c

index fe0c98300b3ed39b7bfce22cb0ddc9d4691235a9..7c87b6865c37fa27fb5556b723e1dfcbbbe0aab2 100644 (file)
@@ -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,