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

Ronald S. Bultje rsbultje
Mon Feb 28 18:06:16 CET 2011


Hi,

2011/2/28 M?ns Rullg?rd <mans at mansr.com>:
> "Ronald S. Bultje" <rsbultje at gmail.com> writes:
>> 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.

Probably makes sense. Anton, can you make it #define avio_skip()
avio_seek(SEEK_CUR)? The rest of the patch looks good.

Ronald



More information about the ffmpeg-devel mailing list