[FFmpeg-devel] [PATCH 1/7] avio: deprecate url_fgets

Ronald S. Bultje rsbultje
Sun Mar 6 19:47:28 CET 2011


Hi,

2011/3/6 M?ns Rullg?rd <mans at mansr.com>:
> Anton Khirnov <anton at khirnov.net> writes:
>
>> It's not used anywhere and doesn't look ver useful to be public.
>> ---
>> ?libavformat/avio.h ? ?| ? ?4 +++-
>> ?libavformat/aviobuf.c | ? ?2 ++
>> ?2 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavformat/avio.h b/libavformat/avio.h
>> index 7136eef..610a3ad 100644
>> --- a/libavformat/avio.h
>> +++ b/libavformat/avio.h
>> @@ -514,9 +514,11 @@ int url_fprintf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__
>> ?int url_fprintf(AVIOContext *s, const char *fmt, ...);
>> ?#endif
>>
>> +#if FF_API_OLD_AVIO
>> ?/** @note unlike fgets, the EOL character is not returned and a whole
>> ? ? ?line is parsed. return NULL if first char read was EOF */
>> -char *url_fgets(AVIOContext *s, char *buf, int buf_size);
>> +attribute_deprecated char *url_fgets(AVIOContext *s, char *buf, int buf_size);
>> +#endif
>>
>> ?void put_flush_packet(AVIOContext *s);
>>
>> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
>> index aff1d13..fffbe2f 100644
>> --- a/libavformat/aviobuf.c
>> +++ b/libavformat/aviobuf.c
>> @@ -921,6 +921,7 @@ int url_fprintf(AVIOContext *s, const char *fmt, ...)
>> ?}
>> ?#endif //CONFIG_MUXERS
>>
>> +#if FF_API_OLD_AVIO
>> ?char *url_fgets(AVIOContext *s, char *buf, int buf_size)
>> ?{
>> ? ? ?int c;
>> @@ -941,6 +942,7 @@ char *url_fgets(AVIOContext *s, char *buf, int buf_size)
>> ? ? ? ? ?*q = '\0';
>> ? ? ?return buf;
>> ?}
>> +#endif
>>
>> ?int url_fget_max_packet_size(AVIOContext *s)
>> ?{
>
> OK with me. ?The function is also broken on Windows as is, so that's one
> more reason to get rid of it.

Queued.

Ronald



More information about the ffmpeg-devel mailing list