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
6f98508e
Commit
6f98508e
authored
Apr 17, 2013
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oma: return meaningful errors
parent
e55e8b2c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
omadec.c
libavformat/omadec.c
+6
-6
No files found.
libavformat/omadec.c
View file @
6f98508e
...
...
@@ -200,13 +200,13 @@ static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
}
if
(
!
em
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"No encryption header found
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
geob
->
datasize
<
64
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid GEOB data size: %u
\n
"
,
geob
->
datasize
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
gdata
=
geob
->
data
;
...
...
@@ -221,7 +221,7 @@ static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
if
(
memcmp
(
&
gdata
[
OMA_ENC_HEADER_SIZE
],
"KEYRING "
,
12
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid encryption header
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
oc
->
rid
=
AV_RB32
(
&
gdata
[
OMA_ENC_HEADER_SIZE
+
28
]);
av_log
(
s
,
AV_LOG_DEBUG
,
"RID: %.8x
\n
"
,
oc
->
rid
);
...
...
@@ -251,7 +251,7 @@ static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
}
if
(
i
>=
sizeof
(
leaf_table
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid key
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
}
...
...
@@ -286,7 +286,7 @@ static int oma_read_header(AVFormatContext *s)
if
(
memcmp
(
buf
,
((
const
uint8_t
[]){
'E'
,
'A'
,
'3'
}),
3
)
||
buf
[
4
]
!=
0
||
buf
[
5
]
!=
EA3_HEADER_SIZE
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Couldn't find the EA3 header !
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
oc
->
content_start
=
avio_tell
(
s
->
pb
);
...
...
@@ -380,7 +380,7 @@ static int oma_read_header(AVFormatContext *s)
break
;
default:
av_log
(
s
,
AV_LOG_ERROR
,
"Unsupported codec %d!
\n
"
,
buf
[
32
]);
return
-
1
;
return
AVERROR
(
ENOSYS
)
;
}
st
->
codec
->
block_align
=
framesize
;
...
...
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