Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
39cb8bd3
Commit
39cb8bd3
authored
Mar 14, 2013
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: check malloc return value.
parent
2f81c097
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+6
-3
No files found.
modules/codec/avcodec/video.c
View file @
39cb8bd3
...
@@ -814,10 +814,12 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
...
@@ -814,10 +814,12 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
p_pic
->
i_qstride
=
p_sys
->
p_ff_pic
->
qstride
;
p_pic
->
i_qstride
=
p_sys
->
p_ff_pic
->
qstride
;
int
i_mb_h
=
(
p_pic
->
format
.
i_height
+
15
)
/
16
;
int
i_mb_h
=
(
p_pic
->
format
.
i_height
+
15
)
/
16
;
p_pic
->
p_q
=
malloc
(
p_pic
->
i_qstride
*
i_mb_h
);
p_pic
->
p_q
=
malloc
(
p_pic
->
i_qstride
*
i_mb_h
);
memcpy
(
p_pic
->
p_q
,
p_sys
->
p_ff_pic
->
qscale_table
,
if
(
p_pic
->
p_q
)
p_pic
->
i_qstride
*
i_mb_h
);
switch
(
p_sys
->
p_ff_pic
->
qscale_type
)
{
{
memcpy
(
p_pic
->
p_q
,
p_sys
->
p_ff_pic
->
qscale_table
,
p_pic
->
i_qstride
*
i_mb_h
);
switch
(
p_sys
->
p_ff_pic
->
qscale_type
)
{
case
FF_QSCALE_TYPE_MPEG1
:
case
FF_QSCALE_TYPE_MPEG1
:
p_pic
->
i_qtype
=
QTYPE_MPEG1
;
p_pic
->
i_qtype
=
QTYPE_MPEG1
;
break
;
break
;
...
@@ -827,6 +829,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
...
@@ -827,6 +829,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
case
FF_QSCALE_TYPE_H264
:
case
FF_QSCALE_TYPE_H264
:
p_pic
->
i_qtype
=
QTYPE_H264
;
p_pic
->
i_qtype
=
QTYPE_H264
;
break
;
break
;
}
}
}
return
p_pic
;
return
p_pic
;
...
...
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