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
1ffd63a4
Commit
1ffd63a4
authored
Jul 11, 2018
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/qt-faststart: Allow free atoms after moov atom.
parent
d36b8394
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
qt-faststart.c
tools/qt-faststart.c
+12
-1
No files found.
tools/qt-faststart.c
View file @
1ffd63a4
...
...
@@ -443,6 +443,8 @@ int main(int argc, char *argv[])
int64_t
start_offset
=
0
;
unsigned
char
*
copy_buffer
=
NULL
;
int
bytes_to_copy
;
uint64_t
free_size
=
0
;
uint64_t
moov_size
=
0
;
if
(
argc
!=
3
)
{
printf
(
"Usage: qt-faststart <infile.mov> <outfile.mov>
\n
"
...
...
@@ -535,6 +537,15 @@ int main(int argc, char *argv[])
* able to continue scanning sensibly after this atom, so break. */
if
(
atom_size
<
8
)
break
;
if
(
atom_type
==
MOOV_ATOM
)
moov_size
=
atom_size
;
if
(
moov_size
&&
atom_type
==
FREE_ATOM
)
{
free_size
+=
atom_size
;
atom_type
=
MOOV_ATOM
;
atom_size
=
moov_size
;
}
}
if
(
atom_type
!=
MOOV_ATOM
)
{
...
...
@@ -551,7 +562,7 @@ int main(int argc, char *argv[])
/* moov atom was, in fact, the last atom in the chunk; load the whole
* moov atom */
if
(
fseeko
(
infile
,
-
atom_size
,
SEEK_END
))
{
if
(
fseeko
(
infile
,
-
(
atom_size
+
free_size
)
,
SEEK_END
))
{
perror
(
argv
[
1
]);
goto
error_out
;
}
...
...
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