Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
71e657ce
Commit
71e657ce
authored
Apr 23, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/sgimb.c: fixed memory leak.
parent
67562c1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
modules/demux/sgimb.c
modules/demux/sgimb.c
+22
-20
No files found.
modules/demux/sgimb.c
View file @
71e657ce
...
...
@@ -107,34 +107,36 @@ static int Activate( vlc_object_t * p_this )
byte_t
*
p_peek
;
int
i_size
;
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
p_sys
->
psz_uri
=
NULL
;
p_sys
->
psz_server
=
NULL
;
p_sys
->
psz_location
=
NULL
;
p_sys
->
psz_name
=
NULL
;
p_sys
->
psz_user
=
NULL
;
p_sys
->
psz_password
=
NULL
;
p_sys
->
psz_mcast_ip
=
NULL
;
p_sys
->
i_mcast_port
=
0
;
p_sys
->
i_packet_size
=
0
;
p_sys
->
i_duration
=
(
mtime_t
)
0
;
p_sys
->
i_port
=
0
;
/* Lets check the content to see if this is a sgi mediabase file */
i_size
=
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
MAX_LINE
);
i_size
-=
sizeof
(
"sgiNameServerHost="
)
-
1
;
if
(
i_size
>
0
)
{
while
(
i_size
&&
strncasecmp
(
p_peek
,
"sgiNameServerHost="
,
sizeof
(
"sgiNameServerHost="
)
-
1
)
)
if
(
i_size
>
0
)
{
while
(
i_size
&&
strncasecmp
(
p_peek
,
"sgiNameServerHost="
,
sizeof
(
"sgiNameServerHost="
)
-
1
)
)
{
p_peek
++
;
i_size
--
;
}
if
(
!
strncasecmp
(
p_peek
,
"sgiNameServerHost="
,
sizeof
(
"sgiNameServerHost="
)
-
1
)
)
if
(
!
strncasecmp
(
p_peek
,
"sgiNameServerHost="
,
sizeof
(
"sgiNameServerHost="
)
-
1
)
)
{
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
p_sys
->
psz_uri
=
NULL
;
p_sys
->
psz_server
=
NULL
;
p_sys
->
psz_location
=
NULL
;
p_sys
->
psz_name
=
NULL
;
p_sys
->
psz_user
=
NULL
;
p_sys
->
psz_password
=
NULL
;
p_sys
->
psz_mcast_ip
=
NULL
;
p_sys
->
i_mcast_port
=
0
;
p_sys
->
i_packet_size
=
0
;
p_sys
->
i_duration
=
0
;
p_sys
->
i_port
=
0
;
return
VLC_SUCCESS
;
}
}
...
...
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