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
1be8c908
Commit
1be8c908
authored
Jul 03, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ismindex: Properly report errors reading the MFRA atom
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
1a068bfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
ismindex.c
tools/ismindex.c
+11
-4
No files found.
tools/ismindex.c
View file @
1be8c908
...
...
@@ -209,10 +209,14 @@ static int read_mfra(struct VideoFiles *files, int start_index,
avio_seek
(
f
,
avio_size
(
f
)
-
4
,
SEEK_SET
);
mfra_size
=
avio_rb32
(
f
);
avio_seek
(
f
,
-
mfra_size
,
SEEK_CUR
);
if
(
avio_rb32
(
f
)
!=
mfra_size
)
if
(
avio_rb32
(
f
)
!=
mfra_size
)
{
err
=
AVERROR_INVALIDDATA
;
goto
fail
;
if
(
avio_rb32
(
f
)
!=
MKBETAG
(
'm'
,
'f'
,
'r'
,
'a'
))
}
if
(
avio_rb32
(
f
)
!=
MKBETAG
(
'm'
,
'f'
,
'r'
,
'a'
))
{
err
=
AVERROR_INVALIDDATA
;
goto
fail
;
}
while
(
!
read_tfra
(
files
,
start_index
,
f
))
{
/* Empty */
}
...
...
@@ -223,6 +227,8 @@ static int read_mfra(struct VideoFiles *files, int start_index,
fail:
if
(
f
)
avio_close
(
f
);
if
(
err
)
fprintf
(
stderr
,
"Unable to read the MFRA atom in %s
\n
"
,
file
);
return
err
;
}
...
...
@@ -355,7 +361,7 @@ static int handle_file(struct VideoFiles *files, const char *file, int split)
avformat_close_input
(
&
ctx
);
read_mfra
(
files
,
orig_files
,
file
,
split
);
err
=
read_mfra
(
files
,
orig_files
,
file
,
split
);
fail:
if
(
ctx
)
...
...
@@ -509,7 +515,8 @@ int main(int argc, char **argv)
}
else
if
(
argv
[
i
][
0
]
==
'-'
)
{
return
usage
(
argv
[
0
],
1
);
}
else
{
handle_file
(
&
vf
,
argv
[
i
],
split
);
if
(
handle_file
(
&
vf
,
argv
[
i
],
split
))
return
1
;
}
}
if
(
!
vf
.
nb_files
||
(
!
basename
&&
!
split
))
...
...
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