Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e2d1ee3c
Commit
e2d1ee3c
authored
Mar 19, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_bits.h: drop len field
parent
6cb8c31a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
include/vlc_bits.h
include/vlc_bits.h
+5
-14
No files found.
include/vlc_bits.h
View file @
e2d1ee3c
...
...
@@ -36,7 +36,6 @@
typedef
struct
bo_t
{
block_t
*
b
;
size_t
len
;
size_t
basesize
;
}
bo_t
;
...
...
@@ -212,25 +211,25 @@ static inline int bo_init(bo_t *p_bo, int i_size)
return
VLC_ENOMEM
;
p_bo
->
b
->
i_buffer
=
0
;
p_bo
->
len
=
p_bo
->
basesize
=
i_size
;
p_bo
->
basesize
=
i_size
;
return
VLC_SUCCESS
;
}
static
inline
void
bo_set_8
(
bo_t
*
p_bo
,
size_t
i_offset
,
uint8_t
i
)
{
if
(
i_offset
>=
p_bo
->
len
)
size_t
i_size
=
p_bo
->
b
->
i_size
-
(
p_bo
->
b
->
p_buffer
-
p_bo
->
b
->
p_start
);
if
(
i_offset
>=
i_size
)
{
int
i_growth
=
p_bo
->
basesize
;
while
(
i_offset
>=
p_bo
->
len
+
i_growth
)
while
(
i_offset
>=
i_size
+
i_growth
)
i_growth
+=
p_bo
->
basesize
;
int
i
=
p_bo
->
b
->
i_buffer
;
/* Realloc would set payload size == buffer size */
p_bo
->
b
=
block_Realloc
(
p_bo
->
b
,
0
,
p_bo
->
len
+
i_growth
);
p_bo
->
b
=
block_Realloc
(
p_bo
->
b
,
0
,
i_size
+
i_growth
);
if
(
!
p_bo
->
b
)
return
;
p_bo
->
b
->
i_buffer
=
i
;
p_bo
->
len
+=
i_growth
;
}
p_bo
->
b
->
p_buffer
[
i_offset
]
=
i
;
}
...
...
@@ -336,12 +335,4 @@ static inline void bo_add_mem(bo_t *p_bo, int i_size, const uint8_t *p_mem)
bo_add_8
(
p_bo
,
p_mem
[
i
]);
}
static
inline
void
bo_add_mp4_tag_descr
(
bo_t
*
p_bo
,
uint8_t
tag
,
uint32_t
size
)
{
bo_add_8
(
p_bo
,
tag
);
for
(
int
i
=
3
;
i
>
0
;
i
--
)
bo_add_8
(
p_bo
,
(
size
>>
(
7
*
i
))
|
0x80
);
bo_add_8
(
p_bo
,
size
&
0x7F
);
}
#endif
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