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
0e84ba74
Commit
0e84ba74
authored
Jun 03, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tta: return meaningful error codrs
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
b4d4ef55
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tta.c
libavformat/tta.c
+3
-3
No files found.
libavformat/tta.c
View file @
0e84ba74
...
...
@@ -64,7 +64,7 @@ static int tta_read_header(AVFormatContext *s)
start_offset
=
avio_tell
(
s
->
pb
);
ffio_init_checksum
(
s
->
pb
,
tta_check_crc
,
UINT32_MAX
);
if
(
avio_rl32
(
s
->
pb
)
!=
AV_RL32
(
"TTA1"
))
return
-
1
;
// not tta file
return
AVERROR_INVALIDDATA
;
avio_skip
(
s
->
pb
,
2
);
// FIXME: flags
channels
=
avio_rl16
(
s
->
pb
);
...
...
@@ -72,7 +72,7 @@ static int tta_read_header(AVFormatContext *s)
samplerate
=
avio_rl32
(
s
->
pb
);
if
(
samplerate
<=
0
||
samplerate
>
1000000
){
av_log
(
s
,
AV_LOG_ERROR
,
"nonsense samplerate
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
datalen
=
avio_rl32
(
s
->
pb
);
...
...
@@ -96,7 +96,7 @@ static int tta_read_header(AVFormatContext *s)
if
(
c
->
totalframes
>=
UINT_MAX
/
sizeof
(
uint32_t
)
||
c
->
totalframes
<=
0
){
av_log
(
s
,
AV_LOG_ERROR
,
"totalframes %d invalid
\n
"
,
c
->
totalframes
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
st
=
avformat_new_stream
(
s
,
NULL
);
...
...
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