Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5958df34
Commit
5958df34
authored
Mar 31, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: deprecate url_max_packet_size().
URLContext.max_packet_size should be used directly.
parent
1869ea03
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
19 deletions
+9
-19
avio.c
libavformat/avio.c
+4
-5
avio.h
libavformat/avio.h
+1
-10
aviobuf.c
libavformat/aviobuf.c
+1
-1
rtmpproto.c
libavformat/rtmpproto.c
+1
-1
rtpproto.c
libavformat/rtpproto.c
+1
-1
sapenc.c
libavformat/sapenc.c
+1
-1
No files found.
libavformat/avio.c
View file @
5958df34
...
...
@@ -208,6 +208,10 @@ int url_get_file_handle(URLContext *h)
{
return
ffurl_get_file_handle
(
h
);
}
int
url_get_max_packet_size
(
URLContext
*
h
)
{
return
h
->
max_packet_size
;
}
#endif
#define URL_SCHEME_CHARS \
...
...
@@ -368,11 +372,6 @@ int ffurl_get_file_handle(URLContext *h)
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
);
...
...
libavformat/avio.h
View file @
5958df34
...
...
@@ -112,6 +112,7 @@ attribute_deprecated int64_t url_seek(URLContext *h, int64_t pos, int whence);
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
/**
...
...
@@ -120,16 +121,6 @@ attribute_deprecated int url_get_file_handle(URLContext *h);
*/
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.
*
...
...
libavformat/aviobuf.c
View file @
5958df34
...
...
@@ -828,7 +828,7 @@ int ffio_fdopen(AVIOContext **s, URLContext *h)
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
{
...
...
libavformat/rtmpproto.c
View file @
5958df34
...
...
@@ -888,7 +888,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
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
;
...
...
libavformat/rtpproto.c
View file @
5958df34
...
...
@@ -206,7 +206,7 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
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
;
...
...
libavformat/sapenc.c
View file @
5958df34
...
...
@@ -218,7 +218,7 @@ static int sap_write_header(AVFormatContext *s)
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment