From ce0b26ac75c3f2d09622c237e685d6d906f6cfe8 Mon Sep 17 00:00:00 2001 From: arpi Date: Tue, 27 Aug 2002 23:01:54 +0000 Subject: [PATCH] - added matrix cracking/debugging code - disabled - use real codec headers for sipr git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7106 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_real.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index f3ecf1c121..cb7864b492 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -8,6 +8,10 @@ TODO: fix the whole syncing mechanism $Log$ + Revision 1.25 2002/08/27 23:01:54 arpi + - added matrix cracking/debugging code - disabled + - use real codec headers for sipr + Revision 1.24 2002/08/25 00:07:15 arpi some files has some shit before teh audio/video headers... @@ -525,9 +529,30 @@ loop: /* if DNET, swap bytes! */ if (sh_audio != NULL) { +#ifdef CRACK_MATRIX + int spos=stream_tell(demuxer->stream); + static int cnt=0; + static int cnt2=CRACK_MATRIX; +#endif dp = new_demux_packet(len); stream_read(demuxer->stream, dp->buffer, len); - mp_dbg(MSGT_DEMUX,MSGL_DBG2,"audio block len=%d\n",len); +#ifdef CRACK_MATRIX + printf("*** audio block len=%d\n",len); + { // HACK - used for reverse engineering the descrambling matrix + FILE* f=fopen("test.rm","r+"); + fseek(f,spos,SEEK_SET); + ++cnt; +// for(i=0;ibuffer[i]=i/0x12; +// for(i=0;ibuffer[i]=i; +// for(i=0;ibuffer[i]=cnt; +// for(i=0;ibuffer[i]=cnt<<4; + for(i=0;ibuffer[i]=(i==cnt2) ? (cnt+16*(8+cnt)) : 0; + if(cnt==6){ cnt=0; ++cnt2; } + fwrite(dp->buffer, len, 1, f); + fclose(f); + if(cnt2>0x150) *((int*)NULL)=1; // sig11 :) + } +#endif if (sh_audio->format == 0x2000) { char *ptr = dp->buffer; @@ -982,6 +1007,7 @@ void demux_open_real(demuxer_t* demuxer) sh->format = 0x2000; break; case MKTAG('s', 'i', 'p', 'r'): +#if 0 mp_msg(MSGT_DEMUX,MSGL_V,"Audio: SiproLab's ACELP.net\n"); sh->format = 0x130; /* for buggy directshow loader */ @@ -1001,6 +1027,7 @@ void demux_open_real(demuxer_t* demuxer) // sh->wf[sizeof(WAVEFORMATEX)+3] = 1; // sh->wf[sizeof(WAVEFORMATEX)+4] = 0; break; +#endif case MKTAG('c', 'o', 'o', 'k'): mp_msg(MSGT_DEMUX,MSGL_V,"Audio: Real's GeneralCooker (?) (RealAudio G2?) (unsupported)\n"); sh->wf->cbSize = 4+2+24;