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
620faee5
Commit
620faee5
authored
Nov 14, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aura: return meaningful error codes.
parent
38de3365
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
aura.c
libavcodec/aura.c
+5
-5
No files found.
libavcodec/aura.c
View file @
620faee5
...
@@ -39,7 +39,7 @@ static av_cold int aura_decode_init(AVCodecContext *avctx)
...
@@ -39,7 +39,7 @@ static av_cold int aura_decode_init(AVCodecContext *avctx)
s
->
avctx
=
avctx
;
s
->
avctx
=
avctx
;
/* width needs to be divisible by 4 for this codec to work */
/* width needs to be divisible by 4 for this codec to work */
if
(
avctx
->
width
&
0x3
)
if
(
avctx
->
width
&
0x3
)
return
-
1
;
return
AVERROR
(
EINVAL
)
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P
;
return
0
;
return
0
;
...
@@ -52,7 +52,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
...
@@ -52,7 +52,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
AuraDecodeContext
*
s
=
avctx
->
priv_data
;
AuraDecodeContext
*
s
=
avctx
->
priv_data
;
uint8_t
*
Y
,
*
U
,
*
V
;
uint8_t
*
Y
,
*
U
,
*
V
;
uint8_t
val
;
uint8_t
val
;
int
x
,
y
;
int
x
,
y
,
ret
;
const
uint8_t
*
buf
=
pkt
->
data
;
const
uint8_t
*
buf
=
pkt
->
data
;
/* prediction error tables (make it clear that they are signed values) */
/* prediction error tables (make it clear that they are signed values) */
...
@@ -61,7 +61,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
...
@@ -61,7 +61,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
if
(
pkt
->
size
!=
48
+
avctx
->
height
*
avctx
->
width
)
{
if
(
pkt
->
size
!=
48
+
avctx
->
height
*
avctx
->
width
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"got a buffer with %d bytes when %d were expected
\n
"
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"got a buffer with %d bytes when %d were expected
\n
"
,
pkt
->
size
,
48
+
avctx
->
height
*
avctx
->
width
);
pkt
->
size
,
48
+
avctx
->
height
*
avctx
->
width
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
}
/* pixel data starts 48 bytes in, after 3x16-byte tables */
/* pixel data starts 48 bytes in, after 3x16-byte tables */
...
@@ -72,9 +72,9 @@ static int aura_decode_frame(AVCodecContext *avctx,
...
@@ -72,9 +72,9 @@ static int aura_decode_frame(AVCodecContext *avctx,
s
->
frame
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
;
s
->
frame
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
;
s
->
frame
.
reference
=
0
;
s
->
frame
.
reference
=
0
;
if
(
ff_get_buffer
(
avctx
,
&
s
->
frame
)
<
0
)
{
if
(
(
ret
=
ff_get_buffer
(
avctx
,
&
s
->
frame
)
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
}
Y
=
s
->
frame
.
data
[
0
];
Y
=
s
->
frame
.
data
[
0
];
...
...
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