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
f57b85a5
Commit
f57b85a5
authored
Sep 05, 2007
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put_ebml_void()
Originally committed as revision 10311 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ab416027
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
matroskaenc.c
libavformat/matroskaenc.c
+18
-0
No files found.
libavformat/matroskaenc.c
View file @
f57b85a5
...
...
@@ -90,6 +90,24 @@ static void put_ebml_string(ByteIOContext *pb, unsigned int elementid, const cha
put_ebml_binary
(
pb
,
elementid
,
str
,
strlen
(
str
));
}
// this reserves exactly the amount of space specified by size, which must be at least 2
static
void
put_ebml_void
(
ByteIOContext
*
pb
,
uint64_t
size
)
{
offset_t
currentpos
=
url_ftell
(
pb
);
if
(
size
<
2
)
return
;
put_ebml_id
(
pb
,
EBML_ID_VOID
);
// we need to subtract the length needed to store the size from the size we need to reserve
// so 2 cases, we use 8 bytes to store the size if possible, 1 byte otherwise
if
(
size
<
10
)
put_ebml_size
(
pb
,
size
-
1
,
0
);
else
put_ebml_size
(
pb
,
size
-
9
,
7
);
url_fseek
(
pb
,
currentpos
+
size
,
SEEK_SET
);
}
static
offset_t
start_ebml_master
(
ByteIOContext
*
pb
,
unsigned
int
elementid
)
{
put_ebml_id
(
pb
,
elementid
);
...
...
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