[FFmpeg-devel] [PATCH] avio: avio_ prefixes for url_fseek/fskip

Måns Rullgård mans
Mon Feb 28 15:14:44 CET 2011


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> Hi,
>
> 2011/2/28 M?ns Rullg?rd <mans at mansr.com>:
>> Anton Khirnov <anton at khirnov.net> writes:
>>> @@ -465,14 +467,14 @@ int avio_put_str16le(AVIOContext *s, const char *str);
>>> ? * fseek() equivalent for AVIOContext.
>>> ? * @return new position or AVERROR.
>>> ? */
>>> -int64_t url_fseek(AVIOContext *s, int64_t offset, int whence);
>>> +int64_t avio_seek(AVIOContext *s, int64_t offset, int whence);
>>>
>>> ?/**
>>> ? * Skip given number of bytes forward.
>>> ? * @param offset number of bytes
>>> ? * @return 0 on success, <0 on error
>>> ? */
>>> -int url_fskip(AVIOContext *s, int64_t offset);
>>> +int avio_skip(AVIOContext *s, int64_t offset);
>>
>> Maybe we should take this opportunity and get rid of skip() entirely.
>> The return value of skip() is only checked in once place (flvdec.c), so
>> replacing it with seek(SEEK_CUR) is trivial.
>
> Or, as in ffio_wfourcc(), replace it with a private macro. It does
> save some typing.

Yes, even a public macro might make sense.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list