URLContext.max_packet_size should be used directly.
{
return ffurl_get_file_handle(h);
}
+int url_get_max_packet_size(URLContext *h)
+{
+ return h->max_packet_size;
+}
#endif
#define URL_SCHEME_CHARS \
return h->prot->url_get_file_handle(h);
}
-int url_get_max_packet_size(URLContext *h)
-{
- return h->max_packet_size;
-}
-
void url_get_filename(URLContext *h, char *buf, int buf_size)
{
av_strlcpy(buf, h->filename, buf_size);
attribute_deprecated int url_close(URLContext *h);
attribute_deprecated int64_t url_filesize(URLContext *h);
attribute_deprecated int url_get_file_handle(URLContext *h);
+attribute_deprecated int url_get_max_packet_size(URLContext *h);
#endif
/**
int url_exist(const char *url);
/**
- * Return the maximum packet size associated to packetized file
- * handle. If the file is not packetized (stream like HTTP or file on
- * disk), then 0 is returned.
- *
- * @param h file handle
- * @return maximum packet size in bytes
- */
-int url_get_max_packet_size(URLContext *h);
-
-/**
* Copy the filename of the resource accessed by h to buf.
*
* @param buf_size size in bytes of buf
uint8_t *buffer;
int buffer_size, max_packet_size;
- max_packet_size = url_get_max_packet_size(h);
+ max_packet_size = h->max_packet_size;
if (max_packet_size) {
buffer_size = max_packet_size; /* no need to bufferize more than one packet */
} else {
rt->flv_off = 0;
}
- s->max_packet_size = url_get_max_packet_size(rt->stream);
+ s->max_packet_size = rt->stream->max_packet_size;
s->is_streamed = 1;
return 0;
s->rtp_fd = ffurl_get_file_handle(s->rtp_hd);
s->rtcp_fd = ffurl_get_file_handle(s->rtcp_hd);
- h->max_packet_size = url_get_max_packet_size(s->rtp_hd);
+ h->max_packet_size = s->rtp_hd->max_packet_size;
h->is_streamed = 1;
return 0;
pos += strlen(&sap->ann[pos]);
sap->ann_size = pos;
- if (sap->ann_size > url_get_max_packet_size(sap->ann_fd)) {
+ if (sap->ann_size > sap->ann_fd->max_packet_size) {
av_log(s, AV_LOG_ERROR, "Announcement too large to send in one "
"packet\n");
goto fail;