[MPlayer-users] Problems with mplayer on PPC

Rogério Brito linuxconsult at yahoo.com.br
Wed Apr 24 11:16:02 CEST 2002


On Apr 24 2002, Arpi wrote:
> so, try this please: (ad_pcm.c)
(...)
> (so change AFMT_S16_LE -> AFMT_S16_BE)
> 
> and tell me if iy's ok (don't forget to change back that if() bellow to
> the original code)

	Ok. This time, it didn't work. I get the white noise effects.
	:-(

	So, with the "wrong" fix it worked, but with the new fix, it
	didn't (obviously, I changed the if condition back to the
	original).

	This is the patch that I applied (to an original tree):

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- mplayer-0.90.orig/libmpcodecs/ad_dvdpcm.c
+++ mplayer-0.90/libmpcodecs/ad_dvdpcm.c
@@ -55,10 +55,10 @@
 {
   int j,len;
   len=demux_read_data(sh_audio->ds,buf,(minlen+3)&(~3));
-  for(j=0;j<len;j+=2){
+  /* for(j=0;j<len;j+=2){
     char x=buf[j];
     buf[j]=buf[j+1];
     buf[j+1]=x;
-  }
+    }*/
   return len;
 }
--- mplayer-0.90.orig/libmpcodecs/ad_pcm.c
+++ mplayer-0.90/libmpcodecs/ad_pcm.c
@@ -30,7 +30,7 @@
     case 0x11: sh_audio->sample_format=AFMT_IMA_ADPCM;break;
     case 0x50: sh_audio->sample_format=AFMT_MPEG;break;
 /*    case 0x2000: sh_audio->sample_format=AFMT_AC3; */
-    default: sh_audio->sample_format=(sh_audio->samplesize==2)?AFMT_S16_LE:AFMT_U8;
+    default: sh_audio->sample_format=(sh_audio->samplesize==2)?AFMT_S16_BE:AFMT_U8;
   }
   return 1;
 }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

> > 	With a VOB from a DVD, it didn't. But that may be another
> > 	problem. I'll have to test it more to give a conclusive
> > 	answer.
> 
> does it have LPCM audio???

	Yes, it does.

> for lpcm, try this in ad_dvdpcm.c:
(...)
> and remove the whole for(){  ...  } section
> and tell me if it's ok

	This one worked perfectly well. Now, I can watch vob files
	without any problem.

	I still can't watch dvds if I use -dvd 1, but that may be an
	unrelated problem which I will investigate later.

	As a side comment, did you get the files that I uploaded to
	the ftp site (regarding the audio/wav dump with incorrect
	headers)?

	(Some time later...)

	Oh, I just looked at the contents of the generated header on
	PPC and the problem seems indeed related to endianness, as I
	suspected.  Instead of "RIFF", it has "FFIR". Other places on
	the headers have strings which are visibly backwards also
	(like "WAVE" and "data" as "EVAW" and "atad", respectively).

	Well, that's it. I'm going to bed now, but if you need any
	further data, don't hesitate to ask.


	Thank you very much, Roger...

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Rogério Brito - rbrito at iname.com - http://www.ime.usp.br/~rbrito/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=




More information about the MPlayer-users mailing list