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
9e1c977b
Commit
9e1c977b
authored
Aug 20, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check malloc return value and fix warnings.
parent
6b44362d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
modules/mux/ogg.c
modules/mux/ogg.c
+21
-0
modules/mux/wav.c
modules/mux/wav.c
+2
-0
No files found.
modules/mux/ogg.c
View file @
9e1c977b
...
...
@@ -218,6 +218,8 @@ static int Open( vlc_object_t *p_this )
msg_Info
(
p_mux
,
"Open"
);
p_sys
=
malloc
(
sizeof
(
sout_mux_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
p_sys
->
i_streams
=
0
;
p_sys
->
i_add_streams
=
0
;
p_sys
->
i_del_streams
=
0
;
...
...
@@ -319,6 +321,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
msg_Dbg
(
p_mux
,
"adding input"
);
p_input
->
p_sys
=
p_stream
=
malloc
(
sizeof
(
ogg_stream_t
)
);
if
(
!
p_stream
)
return
VLC_ENOMEM
;
p_stream
->
i_cat
=
p_input
->
p_fmt
->
i_cat
;
p_stream
->
i_fourcc
=
p_input
->
p_fmt
->
i_codec
;
...
...
@@ -350,6 +354,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
case
VLC_FOURCC
(
'S'
,
'N'
,
'O'
,
'W'
):
case
VLC_FOURCC
(
'd'
,
'r'
,
'a'
,
'c'
):
p_stream
->
p_oggds_header
=
malloc
(
sizeof
(
oggds_header_t
)
);
if
(
!
p_stream
->
p_oggds_header
)
{
free
(
p_stream
);
return
VLC_ENOMEM
;
}
memset
(
p_stream
->
p_oggds_header
,
0
,
sizeof
(
oggds_header_t
)
);
p_stream
->
p_oggds_header
->
i_packet_type
=
PACKET_TYPE_HEADER
;
...
...
@@ -418,6 +427,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_stream
->
p_oggds_header
=
malloc
(
sizeof
(
oggds_header_t
)
+
p_input
->
p_fmt
->
i_extra
);
if
(
!
p_stream
->
p_oggds_header
)
{
free
(
p_stream
);
return
VLC_ENOMEM
;
}
memset
(
p_stream
->
p_oggds_header
,
0
,
sizeof
(
oggds_header_t
)
);
p_stream
->
p_oggds_header
->
i_packet_type
=
PACKET_TYPE_HEADER
;
...
...
@@ -458,6 +472,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
case
VLC_FOURCC
(
's'
,
'u'
,
'b'
,
't'
):
p_stream
->
p_oggds_header
=
malloc
(
sizeof
(
oggds_header_t
)
);
if
(
!
p_stream
->
p_oggds_header
)
{
free
(
p_stream
);
return
VLC_ENOMEM
;
}
memset
(
p_stream
->
p_oggds_header
,
0
,
sizeof
(
oggds_header_t
)
);
p_stream
->
p_oggds_header
->
i_packet_type
=
PACKET_TYPE_HEADER
;
...
...
@@ -537,6 +556,7 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static
block_t
*
OggStreamFlush
(
sout_mux_t
*
p_mux
,
ogg_stream_state
*
p_os
,
mtime_t
i_pts
)
{
(
void
)
p_mux
;
block_t
*
p_og
,
*
p_og_first
=
NULL
;
ogg_page
og
;
...
...
@@ -562,6 +582,7 @@ static block_t *OggStreamFlush( sout_mux_t *p_mux,
static
block_t
*
OggStreamPageOut
(
sout_mux_t
*
p_mux
,
ogg_stream_state
*
p_os
,
mtime_t
i_pts
)
{
(
void
)
p_mux
;
block_t
*
p_og
,
*
p_og_first
=
NULL
;
ogg_page
og
;
...
...
modules/mux/wav.c
View file @
9e1c977b
...
...
@@ -110,6 +110,8 @@ static int Open( vlc_object_t *p_this )
p_mux
->
pf_mux
=
Mux
;
p_mux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
sout_mux_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
p_sys
->
b_used
=
false
;
p_sys
->
b_header
=
true
;
p_sys
->
i_data
=
0
;
...
...
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