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
dd3754a4
Commit
dd3754a4
authored
Jun 30, 2013
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indeo: use proper error code
parent
7388c0c5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ivi_common.c
libavcodec/ivi_common.c
+8
-8
No files found.
libavcodec/ivi_common.c
View file @
dd3754a4
...
...
@@ -85,7 +85,7 @@ static int ivi_create_huff_from_desc(const IVIHuffDesc *cb, VLC *vlc, int flag)
bits
[
pos
]
=
i
+
cb
->
xbits
[
i
]
+
not_last_row
;
if
(
bits
[
pos
]
>
IVI_VLC_BITS
)
return
-
1
;
/* invalid descriptor */
return
AVERROR_INVALIDDATA
;
/* invalid descriptor */
codewords
[
pos
]
=
inv_bits
((
prefix
|
j
),
bits
[
pos
]);
if
(
!
bits
[
pos
])
...
...
@@ -486,7 +486,7 @@ static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile
}
else
{
if
(
sym
>=
256U
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid sym encountered: %d.
\n
"
,
sym
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
run
=
rvmap
->
runtab
[
sym
];
val
=
rvmap
->
valtab
[
sym
];
...
...
@@ -509,7 +509,7 @@ static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile
}
// while
if
(
scan_pos
>=
num_coeffs
&&
sym
!=
rvmap
->
eob_sym
)
return
-
1
;
/* corrupt block data */
return
AVERROR_INVALIDDATA
;
/* corrupt block data */
/* undoing DC coeff prediction for intra-blocks */
if
(
is_intra
&&
band
->
is_2d_trans
)
{
...
...
@@ -836,14 +836,14 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if
(
result
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error while decoding picture header: %d
\n
"
,
result
);
return
-
1
;
return
result
;
}
if
(
ctx
->
gop_invalid
)
return
AVERROR_INVALIDDATA
;
if
(
ctx
->
gop_flags
&
IVI5_IS_PROTECTED
)
{
av
_log
(
avctx
,
AV_LOG_ERROR
,
"Password-protected clip!
\n
"
);
return
-
1
;
av
priv_report_missing_feature
(
avctx
,
"Password-protected clip!
\n
"
);
return
AVERROR_PATCHWELCOME
;
}
ctx
->
switch_buffers
(
ctx
);
...
...
@@ -854,10 +854,10 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
for
(
p
=
0
;
p
<
3
;
p
++
)
{
for
(
b
=
0
;
b
<
ctx
->
planes
[
p
].
num_bands
;
b
++
)
{
result
=
decode_band
(
ctx
,
&
ctx
->
planes
[
p
].
bands
[
b
],
avctx
);
if
(
result
)
{
if
(
result
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error while decoding band: %d, plane: %d
\n
"
,
b
,
p
);
return
-
1
;
return
result
;
}
}
}
...
...
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