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
08db8f18
Commit
08db8f18
authored
May 13, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 5374 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
039627cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
45 deletions
+9
-45
movenc.c
libavformat/movenc.c
+9
-45
No files found.
libavformat/movenc.c
View file @
08db8f18
...
@@ -226,54 +226,18 @@ static int mov_write_damr_tag(ByteIOContext *pb)
...
@@ -226,54 +226,18 @@ static int mov_write_damr_tag(ByteIOContext *pb)
static
unsigned
int
descrLength
(
unsigned
int
len
)
static
unsigned
int
descrLength
(
unsigned
int
len
)
{
{
if
(
len
<
0x00000080
)
int
i
;
return
2
+
len
;
for
(
i
=
1
;
len
>>
(
7
*
i
);
i
++
);
else
if
(
len
<
0x00004000
)
return
len
+
1
+
i
;
return
3
+
len
;
else
if
(
len
<
0x00200000
)
return
4
+
len
;
else
return
5
+
len
;
}
}
static
void
putDescr
(
ByteIOContext
*
pb
,
int
tag
,
int
size
)
static
void
putDescr
(
ByteIOContext
*
pb
,
int
tag
,
unsigned
int
size
)
{
{
uint32_t
len
;
int
i
=
descrLength
(
size
)
-
size
-
2
;
uint8_t
vals
[
4
];
put_byte
(
pb
,
tag
);
for
(;
i
>
0
;
i
--
)
len
=
size
;
put_byte
(
pb
,
(
size
>>
(
7
*
i
))
|
0x80
);
vals
[
3
]
=
(
uint8_t
)(
len
&
0x7f
);
put_byte
(
pb
,
size
&
0x7F
);
len
>>=
7
;
vals
[
2
]
=
(
uint8_t
)((
len
&
0x7f
)
|
0x80
);
len
>>=
7
;
vals
[
1
]
=
(
uint8_t
)((
len
&
0x7f
)
|
0x80
);
len
>>=
7
;
vals
[
0
]
=
(
uint8_t
)((
len
&
0x7f
)
|
0x80
);
put_byte
(
pb
,
tag
);
// DescriptorTag
if
(
size
<
0x00000080
)
{
put_byte
(
pb
,
vals
[
3
]);
}
else
if
(
size
<
0x00004000
)
{
put_byte
(
pb
,
vals
[
2
]);
put_byte
(
pb
,
vals
[
3
]);
}
else
if
(
size
<
0x00200000
)
{
put_byte
(
pb
,
vals
[
1
]);
put_byte
(
pb
,
vals
[
2
]);
put_byte
(
pb
,
vals
[
3
]);
}
else
if
(
size
<
0x10000000
)
{
put_byte
(
pb
,
vals
[
0
]);
put_byte
(
pb
,
vals
[
1
]);
put_byte
(
pb
,
vals
[
2
]);
put_byte
(
pb
,
vals
[
3
]);
}
}
}
static
int
mov_write_esds_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
// Basic
static
int
mov_write_esds_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
// Basic
...
...
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