@@ -173,8 +173,8 @@ uint64_t WriteSimpleBlock(IMkvWriter* writer, const Frame* const frame,
173
173
if (writer->Write (frame->frame (), static_cast <uint32_t >(frame->length ())))
174
174
return 0 ;
175
175
176
- return GetUIntSize (libwebm::kMkvSimpleBlock ) + GetCodedUIntSize (size) + 4 +
177
- frame->length ();
176
+ return static_cast < uint64_t >( GetUIntSize (libwebm::kMkvSimpleBlock ) +
177
+ GetCodedUIntSize (size) + 4 + frame->length () );
178
178
}
179
179
180
180
} // namespace
@@ -229,7 +229,7 @@ uint64_t EbmlMasterElementSize(uint64_t type, uint64_t value) {
229
229
// Datasize
230
230
ebml_size += GetCodedUIntSize (value);
231
231
232
- return ebml_size;
232
+ return static_cast < uint64_t >( ebml_size) ;
233
233
}
234
234
235
235
uint64_t EbmlElementSize (uint64_t type, int64_t value) {
@@ -242,7 +242,7 @@ uint64_t EbmlElementSize(uint64_t type, int64_t value) {
242
242
// Size of Datasize
243
243
ebml_size++;
244
244
245
- return ebml_size;
245
+ return static_cast < uint64_t >( ebml_size) ;
246
246
}
247
247
248
248
uint64_t EbmlElementSize (uint64_t type, uint64_t value) {
@@ -251,10 +251,11 @@ uint64_t EbmlElementSize(uint64_t type, uint64_t value) {
251
251
252
252
uint64_t EbmlElementSize (uint64_t type, uint64_t value, uint64_t fixed_size) {
253
253
// Size of EBML ID
254
- int32_t ebml_size = GetUIntSize (type);
254
+ uint64_t ebml_size = static_cast < uint64_t >( GetUIntSize (type) );
255
255
256
256
// Datasize
257
- ebml_size += (fixed_size > 0 ) ? fixed_size : GetUIntSize (value);
257
+ ebml_size +=
258
+ (fixed_size > 0 ) ? fixed_size : static_cast <uint64_t >(GetUIntSize (value));
258
259
259
260
// Size of Datasize
260
261
ebml_size++;
@@ -264,7 +265,7 @@ uint64_t EbmlElementSize(uint64_t type, uint64_t value, uint64_t fixed_size) {
264
265
265
266
uint64_t EbmlElementSize (uint64_t type, float /* value */ ) {
266
267
// Size of EBML ID
267
- uint64_t ebml_size = GetUIntSize (type);
268
+ uint64_t ebml_size = static_cast < uint64_t >( GetUIntSize (type) );
268
269
269
270
// Datasize
270
271
ebml_size += sizeof (float );
@@ -280,7 +281,7 @@ uint64_t EbmlElementSize(uint64_t type, const char* value) {
280
281
return 0 ;
281
282
282
283
// Size of EBML ID
283
- uint64_t ebml_size = GetUIntSize (type);
284
+ uint64_t ebml_size = static_cast < uint64_t >( GetUIntSize (type) );
284
285
285
286
// Datasize
286
287
ebml_size += strlen (value);
@@ -296,7 +297,7 @@ uint64_t EbmlElementSize(uint64_t type, const uint8_t* value, uint64_t size) {
296
297
return 0 ;
297
298
298
299
// Size of EBML ID
299
- uint64_t ebml_size = GetUIntSize (type);
300
+ uint64_t ebml_size = static_cast < uint64_t >( GetUIntSize (type) );
300
301
301
302
// Datasize
302
303
ebml_size += size;
@@ -309,7 +310,7 @@ uint64_t EbmlElementSize(uint64_t type, const uint8_t* value, uint64_t size) {
309
310
310
311
uint64_t EbmlDateElementSize (uint64_t type) {
311
312
// Size of EBML ID
312
- uint64_t ebml_size = GetUIntSize (type);
313
+ uint64_t ebml_size = static_cast < uint64_t >( GetUIntSize (type) );
313
314
314
315
// Datasize
315
316
ebml_size += kDateElementSize ;
@@ -447,7 +448,7 @@ bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, uint64_t value,
447
448
if (WriteID (writer, type))
448
449
return false ;
449
450
450
- uint64_t size = GetUIntSize (value);
451
+ uint64_t size = static_cast < uint64_t >( GetUIntSize (value) );
451
452
if (fixed_size > 0 ) {
452
453
if (size > fixed_size)
453
454
return false ;
0 commit comments