[Ffmpeg-devel] [PATCH] add skipbytes to tiny_psnr

Benjamin Larsson banan
Tue Jul 18 11:44:30 CEST 2006


Michael Niedermayer wrote:

>Hi
>
>On Tue, Jul 18, 2006 at 01:23:55AM +0200, Benjamin Larsson wrote:
>[...}
>  
>
>>+    int skip_bytes = argc<6 ? 0 : atoi(argv[5]);
>> 
>>     if(argc<3){
>>-        printf("tiny_psnr <file1> <file2> [<elem size> [<shift>]]\n");
>>+        printf("tiny_psnr <file1> <file2> [<elem size> [<shift>] <skip bytes>]\n");
>>    
>>
>
>[] are wrong
>
>
>  
>
>>+        printf("for wav files use the following:\n");
>>+        printf("./tiny_psnr file1.wav file2.wav 2 0 44 to skip the header.\n");		
>>         return -1;
>>     }
>> 
>>@@ -116,6 +119,9 @@
>>     f[1]= fopen(argv[2], "rb");
>>     fseek(f[shift<0], shift < 0 ? -shift : shift, SEEK_SET);
>> 
>>+    fseek(f[0],skip_bytes,SEEK_SET);
>>+    fseek(f[1],skip_bytes,SEEK_SET);
>>    
>>
>
>breaks non zero shift
>
>[...]
>  
>
Is this patch better ?

MvH
Benjamin Larsson

-- 
new tiny signature

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tiny_psnr_skipbytes2.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060718/905151c6/attachment.asc>



More information about the ffmpeg-devel mailing list