From cb5bb521aa01afd43a6d6b5dfcebb14ab73615c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubitux@gmail.com>
Date: Wed, 8 Aug 2012 23:10:17 +0200
Subject: [PATCH] lavf/movenc: use two explicit bytes instead of a short.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This also avoids a pointless cast.

Idea-by: Reimar Döffinger
---
 libavformat/movenc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 89a181acf34..695bd436ee0 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3145,12 +3145,12 @@ static int mov_write_subtitle_end_packet(AVFormatContext *s,
                                          int stream_index,
                                          int64_t dts) {
     AVPacket end;
-    short data = 0;
+    uint8_t data[2] = {0};
     int ret;
 
     av_init_packet(&end);
-    end.size = sizeof (short);
-    end.data = (char *)&data;
+    end.size = sizeof(data);
+    end.data = data;
     end.pts = dts;
     end.dts = dts;
     end.duration = 0;
-- 
GitLab