[Ffmpeg-devel] [PATCH] add skipbytes to tiny_psnr
    Michael Niedermayer 
    michaelni
       
    Tue Jul 18 11:14:26 CEST 2006
    
    
  
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
[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
    
    
More information about the ffmpeg-devel
mailing list