Bug 980810 - Part 1: Fix clang -Wstring-conversion warnings in WebM container writer. r=rillian

This commit is contained in:
Chris Peterson 2014-03-07 00:49:34 -08:00
Родитель aab65dde2d
Коммит d1b61fb8da
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -56,8 +56,8 @@ void EbmlComposer::GenerateHeader()
}
// The Recording length is unknow and ignore write the whole Segment element size
}
MOZ_ASSERT_IF(ebml.offset > DEFAULT_HEADER_SIZE + mCodecPrivateData.Length(),
"write more data > EBML_BUFFER_SIZE");
MOZ_ASSERT(ebml.offset <= DEFAULT_HEADER_SIZE + mCodecPrivateData.Length(),
"write more data > EBML_BUFFER_SIZE");
mClusterBuffs.AppendElement();
mClusterBuffs.LastElement().SetLength(ebml.offset);
memcpy(mClusterBuffs.LastElement().Elements(), ebml.buf, ebml.offset);
@ -117,8 +117,8 @@ EbmlComposer::WriteSimpleBlock(EncodedFrame* aFrame)
0, 0, (unsigned char*)aFrame->GetFrameData().Elements(),
aFrame->GetFrameData().Length());
}
MOZ_ASSERT_IF(ebml.offset > DEFAULT_HEADER_SIZE + aFrame->GetFrameData().Length(),
"write more data > EBML_BUFFER_SIZE");
MOZ_ASSERT(ebml.offset <= DEFAULT_HEADER_SIZE + aFrame->GetFrameData().Length(),
"write more data > EBML_BUFFER_SIZE");
mClusterBuffs.LastElement().SetLength(ebml.offset);
}