Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
784824a6
Commit
784824a6
authored
Jun 04, 2010
by
Howard Chu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use AV_BASE64_SIZE() macro
Originally committed as revision 23462 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
31878fcf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
libtheoraenc.c
libavcodec/libtheoraenc.c
+1
-1
httpauth.c
libavformat/httpauth.c
+1
-1
base64.c
libavutil/base64.c
+1
-1
No files found.
libavcodec/libtheoraenc.c
View file @
784824a6
...
...
@@ -101,7 +101,7 @@ static int get_stats(AVCodecContext *avctx, int eos)
memcpy
(
h
->
stats
+
h
->
stats_offset
,
buf
,
bytes
);
h
->
stats_offset
+=
bytes
;
}
else
{
int
b64_size
=
((
h
->
stats_offset
+
2
)
/
3
)
*
4
+
1
;
int
b64_size
=
AV_BASE64_SIZE
(
h
->
stats_offset
)
;
// libtheora generates a summary header at the end
memcpy
(
h
->
stats
,
buf
,
bytes
);
avctx
->
stats_out
=
av_malloc
(
b64_size
);
...
...
libavformat/httpauth.c
View file @
784824a6
...
...
@@ -294,7 +294,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth,
return
NULL
;
if
(
state
->
auth_type
==
HTTP_AUTH_BASIC
)
{
int
auth_b64_len
=
(
strlen
(
auth
)
+
2
)
/
3
*
4
+
1
;
int
auth_b64_len
=
AV_BASE64_SIZE
(
strlen
(
auth
))
;
int
len
=
auth_b64_len
+
30
;
char
*
ptr
;
authstr
=
av_malloc
(
len
);
...
...
libavutil/base64.c
View file @
784824a6
...
...
@@ -79,7 +79,7 @@ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size)
int
bytes_remaining
=
in_size
;
if
(
in_size
>=
UINT_MAX
/
4
||
out_size
<
(
in_size
+
2
)
/
3
*
4
+
1
)
out_size
<
AV_BASE64_SIZE
(
in_size
)
)
return
NULL
;
ret
=
dst
=
out
;
while
(
bytes_remaining
)
{
...
...
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