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
53d70a33
Commit
53d70a33
authored
Nov 13, 2011
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename remaining get_buffer to avio_read.
parent
39edfcc9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
act.c
libavformat/act.c
+2
-2
asfdec.c
libavformat/asfdec.c
+1
-1
bintext.c
libavformat/bintext.c
+8
-8
g723_1.c
libavformat/g723_1.c
+1
-1
No files found.
libavformat/act.c
View file @
53d70a33
...
...
@@ -126,7 +126,7 @@ static int read_packet(AVFormatContext *s,
if
(
s
->
streams
[
0
]
->
codec
->
sample_rate
==
4400
&&
!
ctx
->
second_packet
)
{
ret
=
get_buffer
(
pb
,
ctx
->
audio_buffer
,
frame_size
);
ret
=
avio_read
(
pb
,
ctx
->
audio_buffer
,
frame_size
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -165,7 +165,7 @@ static int read_packet(AVFormatContext *s,
}
else
// 8000 Hz
{
ret
=
get_buffer
(
pb
,
ctx
->
audio_buffer
,
frame_size
);
ret
=
avio_read
(
pb
,
ctx
->
audio_buffer
,
frame_size
);
if
(
ret
<
0
)
return
ret
;
...
...
libavformat/asfdec.c
View file @
53d70a33
...
...
@@ -166,7 +166,7 @@ static void get_tag(AVFormatContext *s, const char *key, int type, int len)
if
(
type
==
0
)
{
// UTF16-LE
avio_get_str16le
(
s
->
pb
,
len
,
value
,
2
*
len
+
1
);
}
else
if
(
type
==
-
1
)
{
// ASCII
get_buffer
(
s
->
pb
,
value
,
len
);
avio_read
(
s
->
pb
,
value
,
len
);
value
[
len
]
=
0
;
}
else
if
(
type
>
1
&&
type
<=
5
)
{
// boolean or DWORD or QWORD or WORD
uint64_t
num
=
get_value
(
s
->
pb
,
type
);
...
...
libavformat/bintext.c
View file @
53d70a33
...
...
@@ -65,7 +65,7 @@ static int next_tag_read(AVFormatContext *avctx, uint64_t *fsize)
uint64_t
start_pos
=
url_fsize
(
pb
)
-
256
;
avio_seek
(
pb
,
start_pos
,
SEEK_SET
);
if
(
get_buffer
(
pb
,
buf
,
sizeof
(
next_magic
))
!=
sizeof
(
next_magic
))
if
(
avio_read
(
pb
,
buf
,
sizeof
(
next_magic
))
!=
sizeof
(
next_magic
))
return
-
1
;
if
(
memcmp
(
buf
,
next_magic
,
sizeof
(
next_magic
)))
return
-
1
;
...
...
@@ -78,7 +78,7 @@ static int next_tag_read(AVFormatContext *avctx, uint64_t *fsize)
len = get_byte(pb); \
if (len < 1 || len > size) \
return -1; \
if (
get_buffer
(pb, buf, size) == size && *buf) { \
if (
avio_read
(pb, buf, size) == size && *buf) { \
buf[len] = 0; \
av_metadata_set2(&avctx->metadata, name, buf, 0); \
}
...
...
@@ -197,7 +197,7 @@ static int xbin_read_header(AVFormatContext *s,
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata
[
0
]
=
fontheight
;
st
->
codec
->
extradata
[
1
]
=
flags
;
if
(
get_buffer
(
pb
,
st
->
codec
->
extradata
+
2
,
st
->
codec
->
extradata_size
-
2
)
<
0
)
if
(
avio_read
(
pb
,
st
->
codec
->
extradata
+
2
,
st
->
codec
->
extradata_size
-
2
)
<
0
)
return
AVERROR
(
EIO
);
if
(
!
url_is_streamed
(
pb
))
{
...
...
@@ -233,12 +233,12 @@ static int adf_read_header(AVFormatContext *s,
st
->
codec
->
extradata
[
0
]
=
16
;
st
->
codec
->
extradata
[
1
]
=
BINTEXT_PALETTE
|
BINTEXT_FONT
;
if
(
get_buffer
(
pb
,
st
->
codec
->
extradata
+
2
,
24
)
<
0
)
if
(
avio_read
(
pb
,
st
->
codec
->
extradata
+
2
,
24
)
<
0
)
return
AVERROR
(
EIO
);
url_fskip
(
pb
,
144
);
if
(
get_buffer
(
pb
,
st
->
codec
->
extradata
+
2
+
24
,
24
)
<
0
)
if
(
avio_read
(
pb
,
st
->
codec
->
extradata
+
2
+
24
,
24
)
<
0
)
return
AVERROR
(
EIO
);
if
(
get_buffer
(
pb
,
st
->
codec
->
extradata
+
2
+
48
,
4096
)
<
0
)
if
(
avio_read
(
pb
,
st
->
codec
->
extradata
+
2
+
48
,
4096
)
<
0
)
return
AVERROR
(
EIO
);
if
(
!
url_is_streamed
(
pb
))
{
...
...
@@ -293,9 +293,9 @@ static int idf_read_header(AVFormatContext *s,
avio_seek
(
pb
,
avio_size
(
pb
)
-
4096
-
48
,
SEEK_SET
);
if
(
get_buffer
(
pb
,
st
->
codec
->
extradata
+
2
+
48
,
4096
)
<
0
)
if
(
avio_read
(
pb
,
st
->
codec
->
extradata
+
2
+
48
,
4096
)
<
0
)
return
AVERROR
(
EIO
);
if
(
get_buffer
(
pb
,
st
->
codec
->
extradata
+
2
,
48
)
<
0
)
if
(
avio_read
(
pb
,
st
->
codec
->
extradata
+
2
,
48
)
<
0
)
return
AVERROR
(
EIO
);
bin
->
fsize
=
url_fsize
(
pb
)
-
12
-
4096
-
48
;
...
...
libavformat/g723_1.c
View file @
53d70a33
...
...
@@ -62,7 +62,7 @@ static int g723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt
->
duration
=
240
;
pkt
->
stream_index
=
0
;
ret
=
get_buffer
(
s
->
pb
,
pkt
->
data
+
1
,
size
-
1
);
ret
=
avio_read
(
s
->
pb
,
pkt
->
data
+
1
,
size
-
1
);
if
(
ret
<
size
-
1
)
{
av_free_packet
(
pkt
);
return
ret
<
0
?
ret
:
AVERROR_EOF
;
...
...
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