diff --git a/libavformat/avio.h b/libavformat/avio.h index e9d3b1752b..1b483b3a4d 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -623,9 +623,10 @@ int url_resetbuf(AVIOContext *s, int flags); int avio_open(AVIOContext **s, const char *url, int flags); int avio_close(AVIOContext *s); -URLContext *url_fileno(AVIOContext *s); #if FF_API_OLD_AVIO +attribute_deprecated URLContext *url_fileno(AVIOContext *s); + /** * @deprecated use AVIOContext.max_packet_size directly. */ diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 4cd3bdc47d..9f0f292aff 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -923,10 +923,12 @@ int avio_close(AVIOContext *s) return url_close(h); } +#if FF_API_OLD_AVIO URLContext *url_fileno(AVIOContext *s) { return s->opaque; } +#endif int avio_printf(AVIOContext *s, const char *fmt, ...) {