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
d909f43b
Commit
d909f43b
authored
Feb 19, 2016
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vc1dec: wmv2dec: Validate ff_intrax8_common_init return value
parent
0372e73f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
vc1dec.c
libavcodec/vc1dec.c
+6
-4
wmv2dec.c
libavcodec/wmv2dec.c
+1
-3
No files found.
libavcodec/vc1dec.c
View file @
d909f43b
...
...
@@ -314,7 +314,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx)
av_cold
int
ff_vc1_decode_init_alloc_tables
(
VC1Context
*
v
)
{
MpegEncContext
*
s
=
&
v
->
s
;
int
i
;
int
i
,
ret
=
AVERROR
(
ENOMEM
)
;
int
mb_height
=
FFALIGN
(
s
->
mb_height
,
2
);
/* Allocate mb bitplanes */
...
...
@@ -371,8 +371,6 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
v
->
mv_f_next
[
0
]
=
v
->
mv_f_next_base
+
s
->
b8_stride
+
1
;
v
->
mv_f_next
[
1
]
=
v
->
mv_f_next
[
0
]
+
(
s
->
b8_stride
*
(
mb_height
*
2
+
1
)
+
s
->
mb_stride
*
(
mb_height
+
1
)
*
2
);
ff_intrax8_common_init
(
&
v
->
x8
,
s
);
if
(
s
->
avctx
->
codec_id
==
AV_CODEC_ID_WMV3IMAGE
||
s
->
avctx
->
codec_id
==
AV_CODEC_ID_VC1IMAGE
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
v
->
sr_rows
[
i
>>
1
][
i
&
1
]
=
av_malloc
(
v
->
output_width
);
...
...
@@ -381,11 +379,15 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
}
}
ret
=
ff_intrax8_common_init
(
&
v
->
x8
,
s
);
if
(
ret
<
0
)
goto
error
;
return
0
;
error:
ff_vc1_decode_end
(
s
->
avctx
);
return
AVERROR
(
ENOMEM
)
;
return
ret
;
}
av_cold
void
ff_vc1_init_transposed_scantables
(
VC1Context
*
v
)
...
...
libavcodec/wmv2dec.c
View file @
d909f43b
...
...
@@ -471,9 +471,7 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
ff_wmv2_common_init
(
w
);
ff_intrax8_common_init
(
&
w
->
x8
,
&
w
->
s
);
return
0
;
return
ff_intrax8_common_init
(
&
w
->
x8
,
&
w
->
s
);
}
static
av_cold
int
wmv2_decode_end
(
AVCodecContext
*
avctx
)
...
...
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