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
b3db9cee
Commit
b3db9cee
authored
Feb 21, 2011
by
Anton Khirnov
Committed by
Ronald S. Bultje
Feb 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: make get_partial_buffer internal.
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
b7effd4e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
10 deletions
+16
-10
avio.h
libavformat/avio.h
+1
-8
avio_internal.h
libavformat/avio_internal.h
+8
-0
aviobuf.c
libavformat/aviobuf.c
+5
-1
rawdec.c
libavformat/rawdec.c
+2
-1
No files found.
libavformat/avio.h
View file @
b3db9cee
...
...
@@ -385,6 +385,7 @@ attribute_deprecated AVIOContext *av_alloc_put_byte(
* @{
*/
attribute_deprecated
int
get_buffer
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
);
attribute_deprecated
int
get_partial_buffer
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
);
attribute_deprecated
int
get_byte
(
AVIOContext
*
s
);
attribute_deprecated
unsigned
int
get_le16
(
AVIOContext
*
s
);
attribute_deprecated
unsigned
int
get_le24
(
AVIOContext
*
s
);
...
...
@@ -498,14 +499,6 @@ void put_flush_packet(AVIOContext *s);
*/
int
avio_read
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
);
/**
* Read size bytes from AVIOContext into buf.
* This reads at most 1 packet. If that is not enough fewer bytes will be
* returned.
* @return number of bytes read or AVERROR
*/
int
get_partial_buffer
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
);
/** @note return 0 if EOF, so you cannot use it if EOF handling is
necessary */
int
avio_r8
(
AVIOContext
*
s
);
...
...
libavformat/avio_internal.h
View file @
b3db9cee
...
...
@@ -32,4 +32,12 @@ int ffio_init_context(AVIOContext *s,
int64_t
(
*
seek
)(
void
*
opaque
,
int64_t
offset
,
int
whence
));
/**
* Read size bytes from AVIOContext into buf.
* This reads at most 1 packet. If that is not enough fewer bytes will be
* returned.
* @return number of bytes read or AVERROR
*/
int
ffio_read_partial
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
);
#endif // AVFORMAT_AVIO_INTERNAL_H
libavformat/aviobuf.c
View file @
b3db9cee
...
...
@@ -324,6 +324,10 @@ int get_buffer(AVIOContext *s, unsigned char *buf, int size)
{
return
avio_read
(
s
,
buf
,
size
);
}
int
get_partial_buffer
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
)
{
return
ffio_read_partial
(
s
,
buf
,
size
);
}
#endif
int
avio_put_str
(
AVIOContext
*
s
,
const
char
*
str
)
...
...
@@ -548,7 +552,7 @@ int avio_read(AVIOContext *s, unsigned char *buf, int size)
return
size1
-
size
;
}
int
get_partial_buffer
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
)
int
ffio_read_partial
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
)
{
int
len
;
...
...
libavformat/rawdec.c
View file @
b3db9cee
...
...
@@ -21,6 +21,7 @@
*/
#include "avformat.h"
#include "avio_internal.h"
#include "rawdec.h"
/* raw input */
...
...
@@ -81,7 +82,7 @@ int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt)
pkt
->
pos
=
url_ftell
(
s
->
pb
);
pkt
->
stream_index
=
0
;
ret
=
get_partial_buffer
(
s
->
pb
,
pkt
->
data
,
size
);
ret
=
ffio_read_partial
(
s
->
pb
,
pkt
->
data
,
size
);
if
(
ret
<
0
)
{
av_free_packet
(
pkt
);
return
ret
;
...
...
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