[Ffmpeg-devel] Re: [Ffmpeg-cvslog] r7573 - trunk/libavutil/fifo.c

Måns Rullgård mru
Fri Jan 19 02:19:00 CET 2007


Roman Shaposhnik <rvs at Sun.COM> writes:

> On Wed, 2007-01-17 at 21:48 +0000, M?ns Rullg?rd wrote:
>> Roman Shaposhnik <rvs at sun.com> writes:
>> 
>> > On Wed, 2007-01-17 at 21:11 +0100, michael wrote:
>> >> Modified: trunk/libavutil/fifo.c
>> >> ==============================================================================
>> >> --- trunk/libavutil/fifo.c	(original)
>> >> +++ trunk/libavutil/fifo.c	Wed Jan 17 21:11:23 2007
>> >> @@ -99,9 +99,7 @@
>> >>              memcpy(dest, f->rptr, len);
>> >>              dest = (uint8_t*)dest + len;
>> >>          }
>> >> -        f->rptr += len;
>> >> -        if (f->rptr >= f->end)
>> >> -            f->rptr = f->buffer;
>> >> +        av_fifo_drain(f, len);
>> >>          buf_size -= len;
>> >>      }
>> >
>> >   For things like this one, would it make sense to declare
>> > the actual function (av_fifo_drain in this particular case)
>> > an external inline ? Or is it too risky with gcc ? 
>> 
>> GCC often inlines functions even without the inline keyword.  Have you
>> checked whether perhaps it did it here already?
>
>   It seems to be doing it in this particular case. I guess I was more
> concerned about other compilers, but then again, making it 
> "extern inline" doesn't guarantee anything, anyway.

I somehow suspect you might know how at least one of those "other
compilers" handles such cases...

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list