unsigned char buffer[_MMFILE_MKV_READ_BUFFER_LENGTH] = {0, };
int ret = 0;
int len_mask = 0x80;
- unsigned int size = 1, n = 1, total = 0;
+ unsigned long size = 1, n = 1, total = 0;
//char probe_data[] = { 'm', 'a', 't', 'r', 'o', 's', 'k', 'a' };
/*support webm, add probe data*/
const char * probe_data[2] = { "matroska", "webm" };
/* length of header */
total = buffer[4];
- debug_msg(RELEASE, "Initial total header size = [0x%x]", total);
+ debug_msg(RELEASE, "Initial total header size = [%lu]", total);
while (size <= 8 && !(total & len_mask)) {
debug_msg(DEBUG, "This case can not be handled yet....");
len_mask >>= 1;
}
- debug_msg(RELEASE, "Final total header size = [%d]", total);
+ debug_msg(RELEASE, "Final total header size = [%lu]", total);
if (size > 8) {
debug_msg(DEBUG, "This case can not be handled yet....");
/*compare two kinds of probe data*/
for (int i = 0; i < 2; i++) {
- unsigned int probelen = strlen(probe_data[i]);
+ unsigned long probelen = strlen(probe_data[i]);
if (total < probelen)
continue;
for (n = 4 + size ; n <= 4 + size + total - probelen; n++) {
{
unsigned char buffer[TS_MAX_PACKET_SIZE] = {0, };
unsigned char *s = NULL;
- unsigned int startoffset = 0;
+ unsigned long startoffset = 0;
mmfile_seek(fp, 0, MMFILE_SEEK_SET);
mmfile_read(fp, buffer, TS_MAX_PACKET_SIZE);
static int _MMFileIsMP3Header(void *header)
{
- unsigned long head = 0;
+ unsigned int head = 0;
unsigned char *headc = header;
unsigned int bitrate, layer, length/*, mode*/;
unsigned int coef, samplerate, version/*, channels*/;