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
650aa36f
Commit
650aa36f
authored
Dec 02, 2014
by
Lukasz Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/oggenc: use meaningful error codes
Signed-off-by:
Lukasz Marek
<
lukasz.m.luki2@gmail.com
>
parent
85245588
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
oggenc.c
libavformat/oggenc.c
+5
-5
No files found.
libavformat/oggenc.c
View file @
650aa36f
...
...
@@ -348,7 +348,7 @@ static int ogg_build_speex_headers(AVCodecContext *avctx,
uint8_t
*
p
;
if
(
avctx
->
extradata_size
<
SPEEX_HEADER_SIZE
)
return
-
1
;
return
AVERROR_INVALIDDATA
;
// first packet: Speex header
p
=
av_mallocz
(
SPEEX_HEADER_SIZE
);
...
...
@@ -377,7 +377,7 @@ static int ogg_build_opus_headers(AVCodecContext *avctx,
uint8_t
*
p
;
if
(
avctx
->
extradata_size
<
OPUS_HEADER_SIZE
)
return
-
1
;
return
AVERROR_INVALIDDATA
;
/* first packet: Opus header */
p
=
av_mallocz
(
avctx
->
extradata_size
);
...
...
@@ -446,12 +446,12 @@ static int ogg_write_header(AVFormatContext *s)
st
->
codec
->
codec_id
!=
AV_CODEC_ID_FLAC
&&
st
->
codec
->
codec_id
!=
AV_CODEC_ID_OPUS
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Unsupported codec id in stream %d
\n
"
,
i
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
if
(
!
st
->
codec
->
extradata
||
!
st
->
codec
->
extradata_size
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"No extradata present
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
oggstream
=
av_mallocz
(
sizeof
(
*
oggstream
));
if
(
!
oggstream
)
...
...
@@ -511,7 +511,7 @@ static int ogg_write_header(AVFormatContext *s)
oggstream
->
header
,
oggstream
->
header_len
)
<
0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Extradata corrupted
\n
"
);
av_freep
(
&
st
->
priv_data
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
p
=
ogg_write_vorbiscomment
(
7
,
s
->
flags
&
AVFMT_FLAG_BITEXACT
,
...
...
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