diff options
Diffstat (limited to 'apps/plugins/mpegplayer/mpeg_parser.c')
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_parser.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_parser.c b/apps/plugins/mpegplayer/mpeg_parser.c index 5c0fedfd51..27f71e6bde 100644 --- a/apps/plugins/mpegplayer/mpeg_parser.c +++ b/apps/plugins/mpegplayer/mpeg_parser.c | |||
@@ -366,9 +366,9 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id) | |||
366 | pos = pos_new; | 366 | pos = pos_new; |
367 | 367 | ||
368 | DEBUGF("Seeking stream 0x%02x\n", id); | 368 | DEBUGF("Seeking stream 0x%02x\n", id); |
369 | DEBUGF("$$ tl:%u t:%u ct:?? tr:%u\n pl:%zd pn:%zd pr:%zd\n", | 369 | DEBUGF("$$ tl:%u t:%u ct:?? tr:%u\n pl:%ld pn:%ld pr:%ld\n", |
370 | (unsigned)time_left, (unsigned)time, (unsigned)time_right, | 370 | (unsigned)time_left, (unsigned)time, (unsigned)time_right, |
371 | pos_left, pos_new, pos_right); | 371 | (long)pos_left, (long)pos_new, (long)pos_right); |
372 | 372 | ||
373 | sk.dir = SSCAN_REVERSE; | 373 | sk.dir = SSCAN_REVERSE; |
374 | 374 | ||
@@ -425,9 +425,10 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id) | |||
425 | state = STATE2; /* Last scan was early */ | 425 | state = STATE2; /* Last scan was early */ |
426 | sk.dir = SSCAN_REVERSE; | 426 | sk.dir = SSCAN_REVERSE; |
427 | 427 | ||
428 | DEBUGF(">> tl:%u t:%u ct:%u tr:%u\n pl:%zd pn:%zd pr:%zd\n", | 428 | DEBUGF(">> tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", |
429 | (unsigned)time_left, (unsigned)time, (unsigned)currpts, | 429 | (unsigned)time_left, (unsigned)time, (unsigned)currpts, |
430 | (unsigned)time_right, pos_left, pos_new, pos_right); | 430 | (unsigned)time_right, (long)pos_left, (long)pos_new, |
431 | (long)pos_right); | ||
431 | } | 432 | } |
432 | else if (currpts > time) | 433 | else if (currpts > time) |
433 | { | 434 | { |
@@ -453,16 +454,18 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id) | |||
453 | state = STATE3; /* Last scan was late */ | 454 | state = STATE3; /* Last scan was late */ |
454 | sk.dir = SSCAN_REVERSE; | 455 | sk.dir = SSCAN_REVERSE; |
455 | 456 | ||
456 | DEBUGF("<< tl:%u t:%u ct:%u tr:%u\n pl:%zd pn:%zd pr:%zd\n", | 457 | DEBUGF("<< tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", |
457 | (unsigned)time_left, (unsigned)time, (unsigned)currpts, | 458 | (unsigned)time_left, (unsigned)time, (unsigned)currpts, |
458 | (unsigned)time_right, pos_left, pos_new, pos_right); | 459 | (unsigned)time_right, (long)pos_left, (long)pos_new, |
460 | pos_right); | ||
459 | } | 461 | } |
460 | else | 462 | else |
461 | { | 463 | { |
462 | /* Exact match - it happens */ | 464 | /* Exact match - it happens */ |
463 | DEBUGF("|| tl:%u t:%u ct:%u tr:%u\n pl:%zd pn:%zd pr:%zd\n", | 465 | DEBUGF("|| tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", |
464 | (unsigned)time_left, (unsigned)time, (unsigned)currpts, | 466 | (unsigned)time_left, (unsigned)time, (unsigned)currpts, |
465 | (unsigned)time_right, pos_left, pos_new, pos_right); | 467 | (unsigned)time_right, (long)pos_left, (long)pos_new, |
468 | (long)pos_right); | ||
466 | pts = currpts; | 469 | pts = currpts; |
467 | pos = sk.pos; | 470 | pos = sk.pos; |
468 | state = STATE9; | 471 | state = STATE9; |
@@ -492,9 +495,10 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id) | |||
492 | * will find it. */ | 495 | * will find it. */ |
493 | pos_new = pos_left; | 496 | pos_new = pos_left; |
494 | sk.dir = SSCAN_FORWARD; | 497 | sk.dir = SSCAN_FORWARD; |
495 | DEBUGF("?? tl:%u t:%u ct:%u tr:%u\n pl:%zd pn:%zd pr:%zd\n", | 498 | DEBUGF("?? tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", |
496 | (unsigned)time_left, (unsigned)time, (unsigned)currpts, | 499 | (unsigned)time_left, (unsigned)time, (unsigned)currpts, |
497 | (unsigned)time_right, pos_left, pos_new, pos_right); | 500 | (unsigned)time_right, (long)pos_left, (long)pos_new, |
501 | (long)pos_right); | ||
498 | state = STATE1; | 502 | state = STATE1; |
499 | break; | 503 | break; |
500 | default: | 504 | default: |
@@ -521,8 +525,8 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id) | |||
521 | sk.dir = SSCAN_FORWARD; | 525 | sk.dir = SSCAN_FORWARD; |
522 | 526 | ||
523 | uint32_t nextpts = mpeg_parser_scan_pts(&sk, id); | 527 | uint32_t nextpts = mpeg_parser_scan_pts(&sk, id); |
524 | DEBUGF("Seek pos:%zd pts:%u t:%u next pts:%u \n", | 528 | DEBUGF("Seek pos:%ld pts:%u t:%u next pts:%u \n", |
525 | pos, (unsigned)pts, (unsigned)time, (unsigned)nextpts); | 529 | (long)pos, (unsigned)pts, (unsigned)time, (unsigned)nextpts); |
526 | 530 | ||
527 | if (pts <= time && time < nextpts) | 531 | if (pts <= time && time < nextpts) |
528 | { | 532 | { |
@@ -608,8 +612,8 @@ try_again: | |||
608 | str_parser.parms.sd.sk.len = 1024*1024; | 612 | str_parser.parms.sd.sk.len = 1024*1024; |
609 | str_parser.parms.sd.sk.dir = SSCAN_FORWARD; | 613 | str_parser.parms.sd.sk.dir = SSCAN_FORWARD; |
610 | 614 | ||
611 | DEBUGF("thumb pos:%ld len:%zd\n", str_parser.parms.sd.sk.pos, | 615 | DEBUGF("thumb pos:%ld len:%ld\n", str_parser.parms.sd.sk.pos, |
612 | str_parser.parms.sd.sk.len); | 616 | (long)str_parser.parms.sd.sk.len); |
613 | 617 | ||
614 | result = str_send_msg(&video_str, STREAM_SYNC, | 618 | result = str_send_msg(&video_str, STREAM_SYNC, |
615 | (intptr_t)&str_parser.parms.sd); | 619 | (intptr_t)&str_parser.parms.sd); |