[FFmpeg-cvslog] avio: deprecate url_fget_max_packet_size
Anton Khirnov
git
Tue Mar 8 02:43:29 CET 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Mar 6 18:04:49 2011 +0100| [718975aa111bc41deac0d432a7749d0aee6ef7a0] | committer: Michael Niedermayer
avio: deprecate url_fget_max_packet_size
AVIOContext.max_packet_size should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit e8bb2e24398ec838d9e49cf115b7e132609a9fb7)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=718975aa111bc41deac0d432a7749d0aee6ef7a0
---
libavformat/avio.h | 11 ++++-------
libavformat/aviobuf.c | 2 +-
libavformat/rtpenc.c | 2 +-
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index b133ade..0d83755 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -627,15 +627,12 @@ 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
/**
- * Return the maximum packet size associated to packetized buffered file
- * handle. If the file is not packetized (stream like http or file on
- * disk), then 0 is returned.
- *
- * @param s buffered file handle
- * @return maximum packet size in bytes
+ * @deprecated use AVIOContext.max_packet_size directly.
*/
-int url_fget_max_packet_size(AVIOContext *s);
+attribute_deprecated int url_fget_max_packet_size(AVIOContext *s);
+#endif
int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags);
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index aebdd72..6592e9a 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -942,12 +942,12 @@ char *url_fgets(AVIOContext *s, char *buf, int buf_size)
*q = '\0';
return buf;
}
-#endif
int url_fget_max_packet_size(AVIOContext *s)
{
return s->max_packet_size;
}
+#endif
int av_url_read_fpause(AVIOContext *s, int pause)
{
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index b32a9a4..6c49d34 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -93,7 +93,7 @@ static int rtp_write_header(AVFormatContext *s1)
s->first_rtcp_ntp_time = (s1->start_time_realtime / 1000) * 1000 +
NTP_OFFSET_US;
- max_packet_size = url_fget_max_packet_size(s1->pb);
+ max_packet_size = s1->pb->max_packet_size;
if (max_packet_size <= 12)
return AVERROR(EIO);
s->buf = av_malloc(max_packet_size);
More information about the ffmpeg-cvslog
mailing list