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
a3fb3a67
Commit
a3fb3a67
authored
Oct 15, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: avoid implicit truncation in avio_w*
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e377b50b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
aviobuf.c
libavformat/aviobuf.c
+16
-16
No files found.
libavformat/aviobuf.c
View file @
a3fb3a67
...
...
@@ -283,18 +283,18 @@ int url_feof(AVIOContext *s)
void
avio_wl32
(
AVIOContext
*
s
,
unsigned
int
val
)
{
avio_w8
(
s
,
val
);
avio_w8
(
s
,
val
>>
8
);
avio_w8
(
s
,
val
>>
16
);
avio_w8
(
s
,
val
>>
24
);
avio_w8
(
s
,
(
uint8_t
)
val
);
avio_w8
(
s
,
(
uint8_t
)(
val
>>
8
)
);
avio_w8
(
s
,
(
uint8_t
)(
val
>>
16
)
);
avio_w8
(
s
,
val
>>
24
);
}
void
avio_wb32
(
AVIOContext
*
s
,
unsigned
int
val
)
{
avio_w8
(
s
,
val
>>
24
);
avio_w8
(
s
,
val
>>
16
);
avio_w8
(
s
,
val
>>
8
);
avio_w8
(
s
,
val
);
avio_w8
(
s
,
val
>>
24
);
avio_w8
(
s
,
(
uint8_t
)(
val
>>
16
)
);
avio_w8
(
s
,
(
uint8_t
)(
val
>>
8
)
);
avio_w8
(
s
,
(
uint8_t
)
val
);
}
int
avio_put_str
(
AVIOContext
*
s
,
const
char
*
str
)
...
...
@@ -338,7 +338,7 @@ void ff_put_v(AVIOContext *bc, uint64_t val){
int
i
=
ff_get_v_length
(
val
);
while
(
--
i
>
0
)
avio_w8
(
bc
,
128
|
(
val
>>
(
7
*
i
)));
avio_w8
(
bc
,
128
|
(
uint8_t
)(
val
>>
(
7
*
i
)));
avio_w8
(
bc
,
val
&
127
);
}
...
...
@@ -357,26 +357,26 @@ void avio_wb64(AVIOContext *s, uint64_t val)
void
avio_wl16
(
AVIOContext
*
s
,
unsigned
int
val
)
{
avio_w8
(
s
,
val
);
avio_w8
(
s
,
val
>>
8
);
avio_w8
(
s
,
(
uint8_t
)
val
);
avio_w8
(
s
,
(
int
)
val
>>
8
);
}
void
avio_wb16
(
AVIOContext
*
s
,
unsigned
int
val
)
{
avio_w8
(
s
,
val
>>
8
);
avio_w8
(
s
,
val
);
avio_w8
(
s
,
(
int
)
val
>>
8
);
avio_w8
(
s
,
(
uint8_t
)
val
);
}
void
avio_wl24
(
AVIOContext
*
s
,
unsigned
int
val
)
{
avio_wl16
(
s
,
val
&
0xffff
);
avio_w8
(
s
,
val
>>
16
);
avio_w8
(
s
,
(
int
)
val
>>
16
);
}
void
avio_wb24
(
AVIOContext
*
s
,
unsigned
int
val
)
{
avio_wb16
(
s
,
val
>>
8
);
avio_w8
(
s
,
val
);
avio_wb16
(
s
,
(
int
)
val
>>
8
);
avio_w8
(
s
,
(
uint8_t
)
val
);
}
/* Input stream */
...
...
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