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
d46bc413
Commit
d46bc413
authored
Dec 28, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indeo5: Fix crash due to partially initialized gop vars.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
4b35ee0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
indeo5.c
libavcodec/indeo5.c
+4
-3
No files found.
libavcodec/indeo5.c
View file @
d46bc413
...
...
@@ -90,7 +90,7 @@ typedef struct {
*/
static
int
decode_gop_header
(
IVI5DecContext
*
ctx
,
AVCodecContext
*
avctx
)
{
int
result
,
i
,
p
,
tile_size
,
pic_size_indx
,
mb_size
,
blk_size
;
int
result
,
i
,
p
,
tile_size
,
pic_size_indx
,
mb_size
,
blk_size
,
is_scalable
;
int
quant_mat
,
blk_size_changed
=
0
;
IVIBandDesc
*
band
,
*
band1
,
*
band2
;
IVIPicConfig
pic_conf
;
...
...
@@ -112,8 +112,8 @@ static int decode_gop_header(IVI5DecContext *ctx, AVCodecContext *avctx)
/* num_levels * 3 + 1 */
pic_conf
.
luma_bands
=
get_bits
(
&
ctx
->
gb
,
2
)
*
3
+
1
;
pic_conf
.
chroma_bands
=
get_bits1
(
&
ctx
->
gb
)
*
3
+
1
;
ctx
->
is_scalable
=
pic_conf
.
luma_bands
!=
1
||
pic_conf
.
chroma_bands
!=
1
;
if
(
ctx
->
is_scalable
&&
(
pic_conf
.
luma_bands
!=
4
||
pic_conf
.
chroma_bands
!=
1
))
{
is_scalable
=
pic_conf
.
luma_bands
!=
1
||
pic_conf
.
chroma_bands
!=
1
;
if
(
is_scalable
&&
(
pic_conf
.
luma_bands
!=
4
||
pic_conf
.
chroma_bands
!=
1
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Scalability: unsupported subdivision! Luma bands: %d, chroma bands: %d
\n
"
,
pic_conf
.
luma_bands
,
pic_conf
.
chroma_bands
);
return
-
1
;
...
...
@@ -151,6 +151,7 @@ static int decode_gop_header(IVI5DecContext *ctx, AVCodecContext *avctx)
return
-
1
;
}
ctx
->
pic_conf
=
pic_conf
;
ctx
->
is_scalable
=
is_scalable
;
blk_size_changed
=
1
;
/* force reallocation of the internal structures */
}
...
...
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