Changeset 35177


Ignore:
Timestamp:
08/22/15 17:09:58 (9 years ago)
Author:
Stephan
Message:

[titan] new config parm.. stream_workaround_off

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/record.h

    r35175 r35177  
    652652                        {
    653653//Workaround scrambled Bits
     654                                if(getconfigint("stream_workaround_off", NULL) == 0)
     655                                        {
    654656#ifdef MIPSEL
    655                                 debug(251, "data len %i", readret);
    656                                 if(servicenode->tssize == 188)
    657                                 {
    658                                         i = 0;
    659                                         if(buf[i] != 0x47)
    660                                         {
    661                                                 debug(251, "no sync byte at beginn len %i", readret);
    662                                                 i = 1;
    663                                                 while(i <= 188)
     657                                                debug(251, "data len %i", readret);
     658                                                if(servicenode->tssize == 188)
    664659                                                {
    665                                                         if(buf[i] == 0x47)
     660                                                        i = 0;
     661                                                        if(buf[i] != 0x47)
    666662                                                        {
    667                                                                  debug(251, "sync byte found at offset %i", i);
    668                                                                  break;
     663                                                                debug(251, "no sync byte at beginn len %i", readret);
     664                                                                i = 1;
     665                                                                while(i <= 188)
     666                                                                {
     667                                                                        if(buf[i] == 0x47)
     668                                                                        {
     669                                                                                 debug(251, "sync byte found at offset %i", i);
     670                                                                                 break;
     671                                                                        }
     672                                                                        i++;
     673                                                                }
    669674                                                        }
    670                                                         i++;
    671                                                 }
    672                                         }
    673                                         if(i <= 188)
    674                                         {
    675                                                 while(i < readret-4)
    676                                                 {
    677                                                         if(buf[i] == 0x47)
     675                                                        if(i <= 188)
    678676                                                        {
    679                                                                 buf[i+3] = buf[i+3] & 0x3f;
    680                                                                 i = i + 188;
    681                                                         }
    682                                                         else
    683                                                         {
    684                                                                 debug(251, "no sync byte at data len %i", readret);
    685677                                                                while(i < readret-4)
    686678                                                                {
    687                                                                         i = i + 1;
    688679                                                                        if(buf[i] == 0x47)
    689680                                                                        {
    690                                                                                 debug(251, "sync byte found at offset %i", i);
    691681                                                                                buf[i+3] = buf[i+3] & 0x3f;
    692682                                                                                i = i + 188;
    693                                                                                 break;
    694683                                                                        }
    695                                                                 }       
     684                                                                        else
     685                                                                        {
     686                                                                                debug(251, "no sync byte at data len %i", readret);
     687                                                                                while(i < readret-4)
     688                                                                                {
     689                                                                                        i = i + 1;
     690                                                                                        if(buf[i] == 0x47)
     691                                                                                        {
     692                                                                                                debug(251, "sync byte found at offset %i", i);
     693                                                                                                buf[i+3] = buf[i+3] & 0x3f;
     694                                                                                                i = i + 188;
     695                                                                                                break;
     696                                                                                        }
     697                                                                                }       
     698                                                                        }
     699                                                                }
    696700                                                        }
    697701                                                }
     702#endif
    698703                                        }
    699                                 }
    700 #endif
    701704//*
    702705                                writeret = sockwrite(servicenode->recdstfd, buf, readret, writetimeout);
Note: See TracChangeset for help on using the changeset viewer.