cleanup.patch (1541B)
1 diff --git a/media/libmkv/EbmlBufferWriter.c b/media/libmkv/EbmlBufferWriter.c 2 index 8c26e80..5925504 100644 3 --- a/media/libmkv/EbmlBufferWriter.c 4 +++ b/media/libmkv/EbmlBufferWriter.c 5 @@ -14,21 +14,21 @@ Ebml_Serialize(EbmlGlobal *glob, const void *buffer_in, int buffer_size, unsigne 6 /* buffer_size: 7 * 1 - int8_t; 8 * 2 - int16_t; 9 - * 3 - int32_t; 10 - * 4 - int64_t; 11 + * 4 - int32_t; 12 + * 8 - int64_t; 13 */ 14 long i; 15 for(i = len-1; i >= 0; i--) { 16 unsigned char x; 17 if (buffer_size == 1) { 18 x = (char)(*(const int8_t *)buffer_in >> (i * 8)); 19 - } else if (buffer_size == 2) { 20 + } else if (buffer_size == 2) { 21 x = (char)(*(const int16_t *)buffer_in >> (i * 8)); 22 - } else if (buffer_size == 4) { 23 + } else if (buffer_size == 4) { 24 x = (char)(*(const int32_t *)buffer_in >> (i * 8)); 25 - } else if (buffer_size == 8) { 26 + } else if (buffer_size == 8) { 27 x = (char)(*(const int64_t *)buffer_in >> (i * 8)); 28 - } 29 + } 30 Ebml_Write(glob, &x, 1); 31 } 32 } 33 @@ -65,7 +65,7 @@ void Ebml_StartSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc, unsigned long clas 34 Ebml_WriteID(glob, class_id); 35 ebmlLoc->offset = glob->offset; 36 // todo this is always taking 8 bytes, this may need later optimization 37 - Ebml_Serialize(glob, (void *)&unknownLen,sizeof(unknownLen), 8); // this is a key that says lenght unknown 38 + Ebml_Serialize(glob, (void *)&unknownLen,sizeof(unknownLen), 8); // this is a key that says length unknown 39 } 40 41 void Ebml_EndSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc) {