summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpeg_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/mpegplayer/mpeg_parser.c')
-rw-r--r--apps/plugins/mpegplayer/mpeg_parser.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_parser.c b/apps/plugins/mpegplayer/mpeg_parser.c
index 30793e0350..e14c51337f 100644
--- a/apps/plugins/mpegplayer/mpeg_parser.c
+++ b/apps/plugins/mpegplayer/mpeg_parser.c
@@ -354,7 +354,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
354 uint32_t time_right = str_parser.end_pts; 354 uint32_t time_right = str_parser.end_pts;
355 uint32_t pts = 0; 355 uint32_t pts = 0;
356 uint32_t prevpts = 0; 356 uint32_t prevpts = 0;
357 enum state_enum state = state0; 357 enum state_enum state = STATE0;
358 struct stream_scan sk; 358 struct stream_scan sk;
359 359
360 /* Initial estimate taken from average bitrate - later interpolations are 360 /* Initial estimate taken from average bitrate - later interpolations are
@@ -372,7 +372,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
372 372
373 sk.dir = SSCAN_REVERSE; 373 sk.dir = SSCAN_REVERSE;
374 374
375 while (state < state9) 375 while (state < STATE9)
376 { 376 {
377 uint32_t currpts; 377 uint32_t currpts;
378 sk.pos = pos_new; 378 sk.pos = pos_new;
@@ -422,7 +422,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
422 pos_new = pos_right; 422 pos_new = pos_right;
423 } 423 }
424 424
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:%ld pn:%ld pr:%ld\n", 428 DEBUGF(">> tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n",
@@ -450,7 +450,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
450 450
451 pos_new += pos_left - pos_adj; 451 pos_new += pos_left - pos_adj;
452 452
453 state = state3; /* Last scan was late */ 453 state = STATE3; /* Last scan was late */
454 sk.dir = SSCAN_REVERSE; 454 sk.dir = SSCAN_REVERSE;
455 455
456 DEBUGF("<< tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", 456 DEBUGF("<< tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n",
@@ -465,7 +465,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
465 (unsigned)time_right, pos_left, pos_new, pos_right); 465 (unsigned)time_right, pos_left, pos_new, pos_right);
466 pts = currpts; 466 pts = currpts;
467 pos = sk.pos; 467 pos = sk.pos;
468 state = state9; 468 state = STATE9;
469 } 469 }
470 } 470 }
471 else 471 else
@@ -474,17 +474,17 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
474 474
475 switch (state) 475 switch (state)
476 { 476 {
477 case state1: 477 case STATE1:
478 /* We already tried the bruteforce scan and failed again - no 478 /* We already tried the bruteforce scan and failed again - no
479 * more stamps could possibly exist in the interval */ 479 * more stamps could possibly exist in the interval */
480 DEBUGF("!! no timestamp 2x\n"); 480 DEBUGF("!! no timestamp 2x\n");
481 break; 481 break;
482 case state0: 482 case STATE0:
483 /* Hardly likely except at very beginning - just do L->R scan 483 /* Hardly likely except at very beginning - just do L->R scan
484 * to find something */ 484 * to find something */
485 DEBUGF("!! no timestamp on first probe: %ld\n", sk.pos); 485 DEBUGF("!! no timestamp on first probe: %ld\n", sk.pos);
486 case state2: 486 case STATE2:
487 case state3: 487 case STATE3:
488 /* Could just be missing timestamps because the interval is 488 /* Could just be missing timestamps because the interval is
489 * narrowing down. A large block of data from another stream 489 * narrowing down. A large block of data from another stream
490 * may also be in the midst of our chosen points which could 490 * may also be in the midst of our chosen points which could
@@ -495,7 +495,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
495 DEBUGF("?? tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", 495 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, 496 (unsigned)time_left, (unsigned)time, (unsigned)currpts,
497 (unsigned)time_right, pos_left, pos_new, pos_right); 497 (unsigned)time_right, pos_left, pos_new, pos_right);
498 state = state1; 498 state = STATE1;
499 break; 499 break;
500 default: 500 default:
501 DEBUGF("?? Invalid state: %d\n", state); 501 DEBUGF("?? Invalid state: %d\n", state);
@@ -506,7 +506,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
506 if (currpts == prevpts) 506 if (currpts == prevpts)
507 { 507 {
508 DEBUGF("!! currpts == prevpts (stop)\n"); 508 DEBUGF("!! currpts == prevpts (stop)\n");
509 state = state9; 509 state = STATE9;
510 } 510 }
511 511
512 prevpts = currpts; 512 prevpts = currpts;