[Ffmpeg-devel] [RFC] rms calculator

Michael Niedermayer michaelni
Mon Mar 27 15:04:13 CEST 2006


Hi

On Mon, Mar 27, 2006 at 02:44:55PM +0200, Oded Shimon wrote:
> On Mon, Mar 27, 2006 at 01:50:06PM +0200, Michael Niedermayer wrote:
> > rejected
> > 
> > fseek(f[shift< 0], shift + skip, SEEK_SET);
> > fseek(f[shift>=0],         skip, SEEK_SET);
> > is much simpler, and whats more important it is actually correct
> 
> Uhh, you sure?... in that code, what if
> shift<0 && -shift>skip
> 
> you would get a SEEK_SET to a negative position which is incorrect at 
> least and possibly illegal as well... (Am I missing something?)
> 
> To fix his code just change to SEEK_CUR in the second fseeks...?

or put abs() around shift in mine

[...]

-- 
Michael





More information about the ffmpeg-devel mailing list