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
76877bea
Commit
76877bea
authored
Dec 19, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
au: return meaningful error codes
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
a1d14336
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
au.c
libavformat/au.c
+3
-3
No files found.
libavformat/au.c
View file @
76877bea
...
@@ -76,7 +76,7 @@ static int au_read_header(AVFormatContext *s)
...
@@ -76,7 +76,7 @@ static int au_read_header(AVFormatContext *s)
/* check ".snd" header */
/* check ".snd" header */
tag
=
avio_rl32
(
pb
);
tag
=
avio_rl32
(
pb
);
if
(
tag
!=
MKTAG
(
'.'
,
's'
,
'n'
,
'd'
))
if
(
tag
!=
MKTAG
(
'.'
,
's'
,
'n'
,
'd'
))
return
-
1
;
return
AVERROR_INVALIDDATA
;
size
=
avio_rb32
(
pb
);
/* header size */
size
=
avio_rb32
(
pb
);
/* header size */
data_size
=
avio_rb32
(
pb
);
/* data size in bytes */
data_size
=
avio_rb32
(
pb
);
/* data size in bytes */
...
@@ -109,7 +109,7 @@ static int au_read_header(AVFormatContext *s)
...
@@ -109,7 +109,7 @@ static int au_read_header(AVFormatContext *s)
/* now we are ready: build format streams */
/* now we are ready: build format streams */
st
=
avformat_new_stream
(
s
,
NULL
);
st
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
st
)
if
(
!
st
)
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codec
->
codec_tag
=
id
;
st
->
codec
->
codec_tag
=
id
;
st
->
codec
->
codec_id
=
codec
;
st
->
codec
->
codec_id
=
codec
;
...
@@ -156,7 +156,7 @@ static int au_write_header(AVFormatContext *s)
...
@@ -156,7 +156,7 @@ static int au_write_header(AVFormatContext *s)
/* format header */
/* format header */
if
(
put_au_header
(
pb
,
s
->
streams
[
0
]
->
codec
)
<
0
)
{
if
(
put_au_header
(
pb
,
s
->
streams
[
0
]
->
codec
)
<
0
)
{
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
}
avio_flush
(
pb
);
avio_flush
(
pb
);
...
...
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