Skip to content

Commit

Permalink
lavf/avio: rename url_feof() to avio_feof()
Browse files Browse the repository at this point in the history
It's a public function and should use the avio_ namespace

Signed-off-by: James Almer <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
jamrial authored and michaelni committed Aug 7, 2014
1 parent f1e626a commit 5c3c671
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
3 changes: 3 additions & 0 deletions doc/APIchanges
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ libavutil: 2012-10-22

API changes, most recent first:

2014-08-xx - xxxxxxx - lavf 55.53.100 - avio.h
Add avio_feof() and deprecate url_feof().

2014-08-xx - xxxxxxx - lsws 2.1.3 - swscale.h
sws_getContext is not going to be removed in the future.

Expand Down
7 changes: 7 additions & 0 deletions libavformat/avio.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,14 @@ int64_t avio_size(AVIOContext *s);
* feof() equivalent for AVIOContext.
* @return non zero if and only if end of file
*/
int avio_feof(AVIOContext *s);
#if FF_API_URL_FEOF
/**
* @deprecated use avio_feof()
*/
attribute_deprecated
int url_feof(AVIOContext *s);
#endif

/** @warning currently size is limited */
int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
Expand Down
9 changes: 8 additions & 1 deletion libavformat/aviobuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ int64_t avio_size(AVIOContext *s)
return size;
}

int url_feof(AVIOContext *s)
int avio_feof(AVIOContext *s)
{
if(!s)
return 0;
Expand All @@ -303,6 +303,13 @@ int url_feof(AVIOContext *s)
return s->eof_reached;
}

#if FF_API_URL_FEOF
int url_feof(AVIOContext *s)
{
return avio_feof(s);
}
#endif

void avio_wl32(AVIOContext *s, unsigned int val)
{
avio_w8(s, (uint8_t) val );
Expand Down
2 changes: 1 addition & 1 deletion libavformat/libavformat.v
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LIBAVFORMAT_$MAJOR {
ffurl_write;
ffurl_protocol_next;
#those are deprecated, remove on next bump
url_*;
url_feof;
get_*;
ff_codec_get_id;
local: *;
Expand Down
5 changes: 4 additions & 1 deletion libavformat/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#define LIBAVFORMAT_VERSION_MAJOR 55

#define LIBAVFORMAT_VERSION_MINOR 52
#define LIBAVFORMAT_VERSION_MINOR 53
#define LIBAVFORMAT_VERSION_MICRO 100

#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
Expand Down Expand Up @@ -61,6 +61,9 @@
#ifndef FF_API_LAVF_CODEC_TB
#define FF_API_LAVF_CODEC_TB (LIBAVFORMAT_VERSION_MAJOR < 57)
#endif
#ifndef FF_API_URL_FEOF
#define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
#endif

#ifndef FF_API_ALLOC_OUTPUT_CONTEXT
#define FF_API_ALLOC_OUTPUT_CONTEXT (LIBAVFORMAT_VERSION_MAJOR < 56)
Expand Down

0 comments on commit 5c3c671

Please sign in to comment.