media/libmkv/gecko_fix.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libmkv/gecko_fix.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,133 @@
     1.4 +diff --git a/EbmlBufferWriter.h b/EbmlBufferWriter.h
     1.5 +index c135f29..d5116ce 100644
     1.6 +--- a/EbmlBufferWriter.h
     1.7 ++++ b/EbmlBufferWriter.h
     1.8 +@@ -11,6 +11,9 @@ typedef struct {
     1.9 +   unsigned int offset;
    1.10 + } EbmlGlobal;
    1.11 + 
    1.12 ++void Ebml_Write(EbmlGlobal *glob, const void *buffer_in, unsigned long len);
    1.13 ++void Ebml_Serialize(EbmlGlobal *glob, const void *buffer_in,
    1.14 ++                    int buffer_size, unsigned long len);
    1.15 + void Ebml_StartSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc, unsigned long class_id);
    1.16 + void Ebml_EndSubElement(EbmlGlobal *glob,  EbmlLoc *ebmlLoc);
    1.17 + 
    1.18 +diff --git a/EbmlIDs.h b/EbmlIDs.h
    1.19 +index 44d4385..3b5da19 100644
    1.20 +--- a/EbmlIDs.h
    1.21 ++++ b/EbmlIDs.h
    1.22 +@@ -119,7 +119,7 @@ enum mkv {
    1.23 +   /* video */
    1.24 +   Video = 0xE0,
    1.25 +   FlagInterlaced = 0x9A,
    1.26 +-  StereoMode = 0x53B8,
    1.27 ++  WEBM_StereoMode = 0x53B8,
    1.28 +   AlphaMode = 0x53C0,
    1.29 +   PixelWidth = 0xB0,
    1.30 +   PixelHeight = 0xBA,
    1.31 +diff --git a/EbmlWriter.c b/EbmlWriter.c
    1.32 +index ebefc1a..087e817 100644
    1.33 +--- a/EbmlWriter.c
    1.34 ++++ b/EbmlWriter.c
    1.35 +@@ -12,6 +12,7 @@
    1.36 + #include <wchar.h>
    1.37 + #include <string.h>
    1.38 + #include <limits.h>
    1.39 ++#include "EbmlBufferWriter.h"
    1.40 + #if defined(_MSC_VER)
    1.41 + #define LITERALU64(n) n
    1.42 + #else
    1.43 +diff --git a/EbmlWriter.h b/EbmlWriter.h
    1.44 +index a0a848b..3aee2b3 100644
    1.45 +--- a/EbmlWriter.h
    1.46 ++++ b/EbmlWriter.h
    1.47 +@@ -7,10 +7,16 @@
    1.48 +  *  in the file PATENTS.  All contributing project authors may
    1.49 +  *  be found in the AUTHORS file in the root of the source tree.
    1.50 +  */
    1.51 ++
    1.52 ++#ifdef __cplusplus
    1.53 ++extern "C" {
    1.54 ++#endif
    1.55 ++
    1.56 + #ifndef EBMLWRITER_HPP
    1.57 + #define EBMLWRITER_HPP
    1.58 + #include <stddef.h>
    1.59 + #include "vpx/vpx_integer.h"
    1.60 ++#include "EbmlBufferWriter.h"
    1.61 + 
    1.62 + /* note: you must define write and serialize functions as well as your own
    1.63 +  * EBML_GLOBAL
    1.64 +@@ -18,9 +24,9 @@
    1.65 +  * These functions MUST be implemented
    1.66 +  */
    1.67 + 
    1.68 +-typedef struct EbmlGlobal EbmlGlobal;
    1.69 +-void  Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long);
    1.70 +-void  Ebml_Write(EbmlGlobal *glob, const void *, unsigned long);
    1.71 ++// typedef struct EbmlGlobal EbmlGlobal;
    1.72 ++// void  Ebml_Serialize(EbmlGlobal *glob, const void *, int, unsigned long);
    1.73 ++// void  Ebml_Write(EbmlGlobal *glob, const void *, unsigned long);
    1.74 + 
    1.75 + /*****/
    1.76 + 
    1.77 +@@ -41,3 +47,7 @@ void Ebml_SerializeData(EbmlGlobal *glob, unsigned long class_id, unsigned char
    1.78 + void Ebml_WriteVoid(EbmlGlobal *glob, unsigned long vSize);
    1.79 + /* TODO need date function */
    1.80 + #endif
    1.81 ++
    1.82 ++#ifdef __cplusplus
    1.83 ++}
    1.84 ++#endif
    1.85 +diff --git a/WebMElement.c b/WebMElement.c
    1.86 +index 02eefa4..0d5056d 100644
    1.87 +--- a/WebMElement.c
    1.88 ++++ b/WebMElement.c
    1.89 +@@ -6,8 +6,6 @@
    1.90 + // in the file PATENTS.  All contributing project authors may
    1.91 + // be found in the AUTHORS file in the root of the source tree.
    1.92 + 
    1.93 +-
    1.94 +-#include "EbmlBufferWriter.h"
    1.95 + #include "EbmlIDs.h"
    1.96 + #include "WebMElement.h"
    1.97 + #include <stdio.h>
    1.98 +diff --git a/WebMElement.h b/WebMElement.h
    1.99 +index d9ad0a0..987582a 100644
   1.100 +--- a/WebMElement.h
   1.101 ++++ b/WebMElement.h
   1.102 +@@ -6,10 +6,15 @@
   1.103 + // in the file PATENTS.  All contributing project authors may
   1.104 + // be found in the AUTHORS file in the root of the source tree.
   1.105 + 
   1.106 ++#ifdef __cplusplus
   1.107 ++extern "C" {
   1.108 ++#endif
   1.109 + 
   1.110 + #ifndef MKV_CONTEXT_HPP
   1.111 + #define MKV_CONTEXT_HPP 1
   1.112 + 
   1.113 ++#include "EbmlWriter.h"
   1.114 ++
   1.115 + void writeSimpleBock(EbmlGlobal *ebml, unsigned char trackNumber, unsigned short timeCode,
   1.116 +                      int isKeyframe, unsigned char lacingFlag, int  discardable,
   1.117 +                      unsigned char *data, unsigned long dataLength);
   1.118 +@@ -24,12 +29,14 @@ void writeVideoTrack(EbmlGlobal *ebml, unsigned int trackNumber, int flagLacing,
   1.119 +                      double frameRate);
   1.120 + void writeAudioTrack(EbmlGlobal *glob, unsigned int trackNumber, int flagLacing,
   1.121 +                      char *codecId, double samplingFrequency, unsigned int channels,
   1.122 +-                     unsigned char *private, unsigned long privateSize);
   1.123 ++                     unsigned char *private_, unsigned long privateSize);
   1.124 + 
   1.125 + void writeSimpleBlock(EbmlGlobal *ebml, unsigned char trackNumber, short timeCode,
   1.126 +                       int isKeyframe, unsigned char lacingFlag, int discardable,
   1.127 +                       unsigned char *data, unsigned long dataLength);
   1.128 + 
   1.129 ++#endif
   1.130 + 
   1.131 +-
   1.132 +-#endif
   1.133 +\ No newline at end of file
   1.134 ++#ifdef __cplusplus
   1.135 ++}
   1.136 ++#endif

mercurial