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
59f65d95
Commit
59f65d95
authored
Mar 14, 2011
by
Anton Khirnov
Committed by
Ronald S. Bultje
Mar 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: make url_setbufsize internal.
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
4839c192
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
avio.h
libavformat/avio.h
+1
-2
avio_internal.h
libavformat/avio_internal.h
+3
-0
aviobuf.c
libavformat/aviobuf.c
+6
-2
utils.c
libavformat/utils.c
+1
-1
No files found.
libavformat/avio.h
View file @
59f65d95
...
...
@@ -429,6 +429,7 @@ attribute_deprecated int64_t url_ftell(AVIOContext *s);
attribute_deprecated
int64_t
url_fsize
(
AVIOContext
*
s
);
#define URL_EOF (-1)
attribute_deprecated
int
url_fgetc
(
AVIOContext
*
s
);
attribute_deprecated
int
url_setbufsize
(
AVIOContext
*
s
,
int
buf_size
);
/**
* @}
*/
...
...
@@ -586,8 +587,6 @@ static inline int url_is_streamed(AVIOContext *s)
*/
int
url_fdopen
(
AVIOContext
**
s
,
URLContext
*
h
);
/** @warning must be called before any I/O */
int
url_setbufsize
(
AVIOContext
*
s
,
int
buf_size
);
#if FF_API_URL_RESETBUF
/** Reset the buffer for reading or writing.
* @note Will drop any data currently in the buffer without transmitting it.
...
...
libavformat/avio_internal.h
View file @
59f65d95
...
...
@@ -63,4 +63,7 @@ int ffio_rewind_with_probe_data(AVIOContext *s, unsigned char *buf, int buf_size
uint64_t
ffio_read_varlen
(
AVIOContext
*
bc
);
/** @warning must be called before any I/O */
int
ffio_set_buf_size
(
AVIOContext
*
s
,
int
buf_size
);
#endif // AVFORMAT_AVIO_INTERNAL_H
libavformat/aviobuf.c
View file @
59f65d95
...
...
@@ -377,6 +377,10 @@ int64_t url_fsize(AVIOContext *s)
{
return
avio_size
(
s
);
}
int
url_setbufsize
(
AVIOContext
*
s
,
int
buf_size
)
{
return
ffio_set_buf_size
(
s
,
buf_size
);
}
#endif
int
avio_put_str
(
AVIOContext
*
s
,
const
char
*
str
)
...
...
@@ -490,7 +494,7 @@ static void fill_buffer(AVIOContext *s)
/* make buffer smaller in case it ended up large after probing */
if
(
s
->
buffer_size
>
max_buffer_size
)
{
url_setbuf
size
(
s
,
max_buffer_size
);
ffio_set_buf_
size
(
s
,
max_buffer_size
);
s
->
checksum_ptr
=
dst
=
s
->
buffer
;
len
=
s
->
buffer_size
;
...
...
@@ -801,7 +805,7 @@ int url_fdopen(AVIOContext **s, URLContext *h)
return
0
;
}
int
url_setbuf
size
(
AVIOContext
*
s
,
int
buf_size
)
int
ffio_set_buf_
size
(
AVIOContext
*
s
,
int
buf_size
)
{
uint8_t
*
buffer
;
buffer
=
av_malloc
(
buf_size
);
...
...
libavformat/utils.c
View file @
59f65d95
...
...
@@ -621,7 +621,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
goto
fail
;
}
if
(
buf_size
>
0
)
{
url_setbuf
size
(
pb
,
buf_size
);
ffio_set_buf_
size
(
pb
,
buf_size
);
}
if
(
!
fmt
&&
(
err
=
av_probe_input_buffer
(
pb
,
&
fmt
,
filename
,
logctx
,
0
,
logctx
?
(
*
ic_ptr
)
->
probesize
:
0
))
<
0
)
{
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