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
1ce28bdd
Commit
1ce28bdd
authored
Mar 14, 2013
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux/avformat/demux.c: Check malloc return values.
parent
d481fd45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+13
-2
No files found.
modules/demux/avformat/demux.c
View file @
1ce28bdd
...
...
@@ -212,6 +212,11 @@ int OpenDemux( vlc_object_t *p_this )
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
if
(
!
p_sys
)
{
free
(
psz_url
);
return
VLC_ENOMEM
;
}
p_sys
->
ic
=
0
;
p_sys
->
fmt
=
fmt
;
p_sys
->
i_tk
=
0
;
...
...
@@ -224,7 +229,12 @@ int OpenDemux( vlc_object_t *p_this )
/* Create I/O wrapper */
p_sys
->
io_buffer_size
=
32768
;
/* FIXME */
p_sys
->
io_buffer
=
malloc
(
p_sys
->
io_buffer_size
);
if
(
!
p_sys
->
io_buffer
)
{
free
(
psz_url
);
CloseDemux
(
p_this
);
return
VLC_ENOMEM
;
}
#if LIBAVFORMAT_VERSION_INT >= ((53<<16)+(2<<8)+0)
p_sys
->
ic
=
avformat_alloc_context
();
p_sys
->
ic
->
pb
=
avio_alloc_context
(
p_sys
->
io_buffer
,
...
...
@@ -321,7 +331,8 @@ int OpenDemux( vlc_object_t *p_this )
if
(
cc
->
palctrl
)
{
fmt
.
video
.
p_palette
=
malloc
(
sizeof
(
video_palette_t
)
);
*
fmt
.
video
.
p_palette
=
*
(
video_palette_t
*
)
cc
->
palctrl
;
if
(
fmt
.
video
.
p_palette
)
*
fmt
.
video
.
p_palette
=
*
(
video_palette_t
*
)
cc
->
palctrl
;
}
#else
# warning FIXME: implement palette transmission
...
...
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