AVIOContext.max_packet_size should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
int avio_close(AVIOContext *s);
URLContext *url_fileno(AVIOContext *s);
int avio_close(AVIOContext *s);
URLContext *url_fileno(AVIOContext *s);
- * 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);
int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags);
int url_fget_max_packet_size(AVIOContext *s)
{
return s->max_packet_size;
}
int url_fget_max_packet_size(AVIOContext *s)
{
return s->max_packet_size;
}
int av_url_read_fpause(AVIOContext *s, int pause)
{
int av_url_read_fpause(AVIOContext *s, int pause)
{
s->first_rtcp_ntp_time = (s1->start_time_realtime / 1000) * 1000 +
NTP_OFFSET_US;
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);
if (max_packet_size <= 12)
return AVERROR(EIO);
s->buf = av_malloc(max_packet_size);