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

Ronald S. Bultje rsbultje
Mon Feb 28 15:05:58 CET 2011


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.

Ronald



More information about the ffmpeg-devel mailing list