Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / ffmpeg / libavcodec / movtextenc.c
index 9b0a6c5..1b8f454 100644 (file)
@@ -41,7 +41,7 @@ static av_cold int mov_text_encode_init(AVCodecContext *avctx)
      * For now, we'll use a fixed default style. When we add styling
      * support, this will be generated from the ASS style.
      */
-    static uint8_t text_sample_entry[] = {
+    static const uint8_t text_sample_entry[] = {
         0x00, 0x00, 0x00, 0x00, // uint32_t displayFlags
         0x01,                   // int8_t horizontal-justification
         0xFF,                   // int8_t vertical-justification
@@ -75,7 +75,7 @@ static av_cold int mov_text_encode_init(AVCodecContext *avctx)
     MovTextContext *s = avctx->priv_data;
 
     avctx->extradata_size = sizeof text_sample_entry;
-    avctx->extradata = av_mallocz(avctx->extradata_size);
+    avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
     if (!avctx->extradata)
         return AVERROR(ENOMEM);