Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
74512f7e
Commit
74512f7e
authored
Sep 01, 2014
by
Gabriel Dume
Committed by
Diego Biurrun
Sep 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8svx: Return proper error codes
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
e48d1ea5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
8svx.c
libavcodec/8svx.c
+5
-5
No files found.
libavcodec/8svx.c
View file @
74512f7e
...
@@ -96,11 +96,11 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -96,11 +96,11 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
if
(
avpkt
->
size
<
hdr_size
*
avctx
->
channels
)
{
if
(
avpkt
->
size
<
hdr_size
*
avctx
->
channels
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"packet size is too small
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"packet size is too small
\n
"
);
return
AVERROR
(
EINVAL
)
;
return
AVERROR
_INVALIDDATA
;
}
}
if
(
esc
->
data
[
0
])
{
if
(
esc
->
data
[
0
])
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"unexpected data after first packet
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"unexpected data after first packet
\n
"
);
return
AVERROR
(
EINVAL
)
;
return
AVERROR
_INVALIDDATA
;
}
}
if
(
is_compr
)
{
if
(
is_compr
)
{
...
@@ -125,7 +125,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -125,7 +125,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
}
}
if
(
!
esc
->
data
[
0
])
{
if
(
!
esc
->
data
[
0
])
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"unexpected empty packet
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"unexpected empty packet
\n
"
);
return
AVERROR
(
EINVAL
)
;
return
AVERROR
_INVALIDDATA
;
}
}
/* decode next piece of data from the buffer */
/* decode next piece of data from the buffer */
...
@@ -166,7 +166,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
...
@@ -166,7 +166,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
if
(
avctx
->
channels
<
1
||
avctx
->
channels
>
2
)
{
if
(
avctx
->
channels
<
1
||
avctx
->
channels
>
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"8SVX does not support more than 2 channels
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"8SVX does not support more than 2 channels
\n
"
);
return
AVERROR
(
EINVAL
)
;
return
AVERROR
_INVALIDDATA
;
}
}
switch
(
avctx
->
codec
->
id
)
{
switch
(
avctx
->
codec
->
id
)
{
...
@@ -179,7 +179,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
...
@@ -179,7 +179,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
case
AV_CODEC_ID_PCM_S8_PLANAR
:
case
AV_CODEC_ID_PCM_S8_PLANAR
:
break
;
break
;
default:
default:
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
}
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_U8P
;
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_U8P
;
...
...
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