501{
502
503 int freeformat_count = 0;
504 unsigned long newhead;
507
510
511
512
513
514 long headcount = 0;
515
517
519
520
522
527#endif
528 ) )
529 {
531 " frames as indicated fixed track length"
533 return 0;
534 }
535
536read_again:
537
538
539 if(fr->
rd->forget !=
NULL) fr->
rd->forget(fr);
540
542 if((
ret = fr->
rd->head_read(fr,&newhead)) <= 0){
debug1(
"need more? (%i)",
ret);
goto read_frame_bad;}
543
544init_resync:
545
546#ifdef SKIP_JUNK
548 {
551 }
552#endif
553
556
559 {
562
564 }
565
567 {
571
572 if(
ret < 0) fr->
rd->back_bytes(fr, 4);
574 }
575
576
577
579 {
581 {
583 " as its header indicates Frankenstein coming for you", (
off_p)fr->
num );
584 return 0;
585 }
586 }
587
588
589 framepos = fr->
rd->tell(fr) - 4;
590
591 {
593
596 {
597
599 goto read_frame_bad;
600 }
603 }
605
607 {
609
610
611
613 {
615
616
618 {
619 if(fr->
rd->forget !=
NULL) fr->
rd->forget(fr);
620
622 goto read_again;
623 }
624
626 }
627
629 }
630
632
633
634
636 {
638 }
646#endif
647 ))
648 {
653#endif
655 }
656
658
659
661#ifdef FRAME_INDEX
662
663
666#endif
667
669
670 if(fr->
rd->forget !=
NULL) fr->
rd->forget(fr);
671
674
675
676
677
678
679
680
681
682
683
685 {
688 {
690 else
691
692
695 else
696 {
699 fprintf(
stderr,
"\nWarning: Big change (MPEG version, layer, rate). Frankenstein stream?\n");
700 }
701 }
703 {
706 fprintf(
stderr,
"\nWarning: Big change from first (MPEG version, layer, rate). Frankenstein stream?\n");
707 }
708 }
709
711
712 return 1;
713read_frame_bad:
714
715
716 if(fr->
rd->forget !=
NULL) fr->
rd->forget(fr);
717
722
724}
static unsigned int getbits(mpg123_handle *fr, int number_of_bits)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define FI_NEXT(fi, framenum)
#define debug4(s, a, b, c, d)
static int do_readahead(mpg123_handle *fr, unsigned long newhead)
#define JUMP_CONCLUSION(ret)
static int head_compatible(unsigned long fred, unsigned long bret)
static int decode_header(mpg123_handle *fr, unsigned long newhead, int *freeformat_count)
static void halfspeed_prepare(mpg123_handle *fr)
static int halfspeed_do(mpg123_handle *fr)
static int check_lame_tag(mpg123_handle *fr)
static int head_check(unsigned long head)
static int wetwork(mpg123_handle *fr, unsigned long *newheadp)
static int skip_junk(mpg123_handle *fr, unsigned long *newheadp, long *headcount)
struct mpg123_pars_struct p
unsigned char bsspace[2][MAXFRAMESIZE+512+4]