[MPlayer-dev-eng] [PATCH] fix for -srate bug

Ed Wildgoose lists at wildgooses.com
Mon Oct 25 00:55:53 CEST 2004


Hi Michael,

Had a chance to look at this code a little.  I have a couple of quick 
questions:


Why did you do this:

>@@ -351,15 +402,34 @@
> 	src_data.data_in = input ;
> 	src_data.input_frames = BUFFER_LEN ;
> 
>-	src_data.src_ratio = 1.999 ;
>+	src_data.src_ratio = 0.4999 ;
>  
>

and this:

>@@ -402,7 +472,7 @@
> 
> 	freq = f1 + (3.0 - a1) * (f2 - f1) / (a2 - a1) ;
> 
>-	return 200.0 * freq ;
>+	return 400.0 * freq ;
> } /* bandwidth_test */
>  
>

I can't quite follow your logic here?

Also, you convert from int to float and add 0.5.  But you don't reverse 
this logic when you convert back to int?  Why is this?

Thanks for any pointers

Ed W




More information about the MPlayer-dev-eng mailing list