[FFmpeg-devel] [PATCH] avio: deprecate url_feof

Michael Niedermayer michaelni
Tue Mar 8 03:07:03 CET 2011


On Mon, Mar 07, 2011 at 05:46:48PM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Mon, Mar 7, 2011 at 5:43 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Mon, Mar 07, 2011 at 05:34:10PM -0500, Ronald S. Bultje wrote:
> >> Hi,
> >>
> >> On Mon, Mar 7, 2011 at 5:31 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > On Mon, Mar 07, 2011 at 05:29:14PM -0500, Ronald S. Bultje wrote:
> >> >> On Mon, Mar 7, 2011 at 5:22 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> >> > On Mon, Mar 07, 2011 at 09:50:25PM +0100, Anton Khirnov wrote:
> >> >> >> AVIOContext.eof_reached should be used directly instead.
> >> >> >
> >> >> > If you are at eof, and some other process (wget?) appends to the file
> >> >> > url_feof() could return 0 again. with direct access this is harder
> >> >>
> >> >> url_feof() reutrns s->eof_reached??
> >> >
> >> > you can put something else in there like
> >> > if(protocol.check_eof()) return protocol.check_eof();
> >>
> >> Right, but that wasn't there for the past 5 years, so it's likely OK.
> >
> > the API hasnt changed in 5 years and so its ok to make it worse?
> > nice reasoning
> 
> Ok, so do you want to make it a static av_always_inline avio_eof()
> function then?

no, i want to leave it as it is

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110308/190d9c22/attachment.pgp>



More information about the ffmpeg-devel mailing list