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
c4274d11
Commit
c4274d11
authored
Jan 22, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lagarith: return more meaningful error codes
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
5b10c5e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
lagarith.c
libavcodec/lagarith.c
+10
-9
No files found.
libavcodec/lagarith.c
View file @
c4274d11
...
...
@@ -518,6 +518,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
uint32_t
offs
[
4
];
uint8_t
*
srcs
[
4
],
*
dst
;
int
i
,
j
,
planes
=
3
;
int
ret
;
AVFrame
*
picture
=
data
;
...
...
@@ -544,9 +545,9 @@ static int lag_decode_frame(AVCodecContext *avctx,
planes
=
4
;
}
if
(
ff_thread_get_buffer
(
avctx
,
p
)
<
0
)
{
if
(
(
ret
=
ff_thread_get_buffer
(
avctx
,
p
)
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
dst
=
p
->
data
[
0
];
...
...
@@ -573,9 +574,9 @@ static int lag_decode_frame(AVCodecContext *avctx,
if
(
frametype
==
FRAME_ARITH_RGB24
||
frametype
==
FRAME_U_RGB24
)
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB24
;
if
(
ff_thread_get_buffer
(
avctx
,
p
)
<
0
)
{
if
(
(
ret
=
ff_thread_get_buffer
(
avctx
,
p
)
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
offs
[
0
]
=
offset_bv
;
...
...
@@ -632,9 +633,9 @@ static int lag_decode_frame(AVCodecContext *avctx,
case
FRAME_ARITH_YUY2
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P
;
if
(
ff_thread_get_buffer
(
avctx
,
p
)
<
0
)
{
if
(
(
ret
=
ff_thread_get_buffer
(
avctx
,
p
)
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
if
(
offset_ry
>=
buf_size
||
...
...
@@ -658,9 +659,9 @@ static int lag_decode_frame(AVCodecContext *avctx,
case
FRAME_ARITH_YV12
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P
;
if
(
ff_thread_get_buffer
(
avctx
,
p
)
<
0
)
{
if
(
(
ret
=
ff_thread_get_buffer
(
avctx
,
p
)
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
if
(
buf_size
<=
offset_ry
||
buf_size
<=
offset_gu
||
buf_size
<=
offset_bv
)
{
return
AVERROR_INVALIDDATA
;
...
...
@@ -687,7 +688,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported Lagarith frame type: %#x
\n
"
,
frametype
);
return
-
1
;
return
AVERROR_PATCHWELCOME
;
}
*
picture
=
*
p
;
...
...
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