Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
aa340922
Commit
aa340922
authored
Oct 08, 2006
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of rev 16972 (fixed bunch of memory leaks)
parent
973ed38c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
54 additions
and
17 deletions
+54
-17
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+25
-4
modules/demux/playlist/old.c
modules/demux/playlist/old.c
+6
-0
modules/demux/playlist/playlist.c
modules/demux/playlist/playlist.c
+2
-2
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+3
-1
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+7
-1
modules/demux/playlist/xspf.h
modules/demux/playlist/xspf.h
+5
-0
modules/gui/wxwidgets/dialogs/playlist.cpp
modules/gui/wxwidgets/dialogs/playlist.cpp
+2
-2
modules/misc/xml/libxml.c
modules/misc/xml/libxml.c
+2
-5
src/input/input.c
src/input/input.c
+2
-2
No files found.
modules/demux/mp4/libmp4.c
View file @
aa340922
...
...
@@ -958,8 +958,11 @@ static int MP4_ReadBox_avcC( stream_t *p_stream, MP4_Box_t *p_box )
p_avcC
=
p_box
->
data
.
p_avcC
;
p_avcC
->
i_avcC
=
i_read
;
p_avcC
->
p_avcC
=
malloc
(
p_avcC
->
i_avcC
);
memcpy
(
p_avcC
->
p_avcC
,
p_peek
,
i_read
);
if
(
p_avcC
->
i_avcC
>
0
)
{
p_avcC
->
p_avcC
=
malloc
(
p_avcC
->
i_avcC
);
memcpy
(
p_avcC
->
p_avcC
,
p_peek
,
i_read
);
}
MP4_GET1BYTE
(
p_avcC
->
i_version
);
MP4_GET1BYTE
(
p_avcC
->
i_profile
);
...
...
@@ -1031,6 +1034,12 @@ static void MP4_FreeBox_avcC( MP4_Box_t *p_box )
MP4_Box_data_avcC_t
*
p_avcC
=
p_box
->
data
.
p_avcC
;
int
i
;
if
(
p_avcC
->
i_avcC
>
0
)
{
if
(
p_avcC
->
p_avcC
)
free
(
p_avcC
->
p_avcC
);
p_avcC
->
p_avcC
=
NULL
;
}
for
(
i
=
0
;
i
<
p_avcC
->
i_sps
;
i
++
)
{
FREE
(
p_avcC
->
sps
[
i
]
);
...
...
@@ -1039,8 +1048,20 @@ static void MP4_FreeBox_avcC( MP4_Box_t *p_box )
{
FREE
(
p_avcC
->
pps
[
i
]
);
}
if
(
p_avcC
->
i_sps
>
0
)
FREE
(
p_avcC
->
sps
);
if
(
p_avcC
->
i_pps
>
0
)
FREE
(
p_avcC
->
pps
);
if
(
p_avcC
->
i_sps
>
0
)
{
FREE
(
p_avcC
->
sps
);
p_avcC
->
sps
=
NULL
;
FREE
(
p_avcC
->
i_sps_length
);
p_avcC
->
i_sps_length
=
NULL
;
}
if
(
p_avcC
->
i_pps
>
0
)
{
FREE
(
p_avcC
->
pps
);
p_avcC
->
pps
=
NULL
;
FREE
(
p_avcC
->
i_pps_length
);
p_avcC
->
i_pps_length
=
NULL
;
}
}
static
int
MP4_ReadBox_sample_soun
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
...
...
modules/demux/playlist/old.c
View file @
aa340922
...
...
@@ -61,6 +61,12 @@ int E_(Import_Old)( vlc_object_t *p_this )
return
VLC_SUCCESS
;
}
void
E_
(
Close_Old
)(
vlc_object_t
*
p_this
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
msg_Dbg
(
p_demux
,
"close old playlist file"
);
}
static
int
Demux
(
demux_t
*
p_demux
)
{
char
*
psz_line
;
...
...
modules/demux/playlist/playlist.c
View file @
aa340922
...
...
@@ -54,7 +54,7 @@ vlc_module_begin();
set_description
(
_
(
"Playlist"
)
);
add_shortcut
(
"old-open"
);
set_capability
(
"demux2"
,
10
);
set_callbacks
(
E_
(
Import_Old
),
NULL
);
set_callbacks
(
E_
(
Import_Old
),
E_
(
Close_Old
)
);
#if 0
add_submodule();
set_description( _("Native playlist import") );
...
...
@@ -93,7 +93,7 @@ vlc_module_begin();
set_description
(
_
(
"XSPF playlist import"
)
);
add_shortcut
(
"xspf-open"
);
set_capability
(
"demux2"
,
10
);
set_callbacks
(
E_
(
xspf_import_Activate
),
NULL
);
set_callbacks
(
E_
(
Import_xspf
),
E_
(
Close_xspf
)
);
add_submodule
();
set_description
(
_
(
"New winamp 5.2 shoutcast import"
)
);
add_shortcut
(
"shout-winamp"
);
...
...
modules/demux/playlist/playlist.h
View file @
aa340922
...
...
@@ -27,6 +27,7 @@ char *E_(FindPrefix)( demux_t * );
vlc_bool_t
E_
(
FindItem
)(
demux_t
*
,
playlist_t
*
,
playlist_item_t
**
);
int
E_
(
Import_Old
)
(
vlc_object_t
*
);
void
E_
(
Close_Old
)
(
vlc_object_t
*
);
int
E_
(
Import_Native
)
(
vlc_object_t
*
);
void
E_
(
Close_Native
)
(
vlc_object_t
*
);
...
...
@@ -46,7 +47,8 @@ void E_(Close_DVB) ( vlc_object_t * );
int
E_
(
Import_podcast
)
(
vlc_object_t
*
);
void
E_
(
Close_podcast
)
(
vlc_object_t
*
);
int
E_
(
xspf_import_Activate
)
(
vlc_object_t
*
);
int
E_
(
Import_xspf
)
(
vlc_object_t
*
);
void
E_
(
Close_xspf
)
(
vlc_object_t
*
);
int
E_
(
Import_Shoutcast
)
(
vlc_object_t
*
);
void
E_
(
Close_Shoutcast
)
(
vlc_object_t
*
);
modules/demux/playlist/xspf.c
View file @
aa340922
...
...
@@ -33,7 +33,7 @@
/**
* \brief XSPF submodule initialization function
*/
int
E_
(
xspf_import_Activate
)(
vlc_object_t
*
p_this
)
int
E_
(
Import_xspf
)(
vlc_object_t
*
p_this
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
char
*
psz_ext
;
...
...
@@ -57,6 +57,12 @@ int E_(xspf_import_Activate)( vlc_object_t *p_this )
return
VLC_SUCCESS
;
}
void
E_
(
Close_xpsf
)(
vlc_object_t
*
p_this
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
msg_Dbg
(
p_demux
,
"closing xspf playlist"
);
}
/**
* \brief demuxer function for XSPF parsing
*/
...
...
modules/demux/playlist/xspf.h
View file @
aa340922
...
...
@@ -15,6 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*******************************************************************************/
#ifndef _XSPF_H_
#define _XSPF_H_ 1
/**
* \file modules/demux/playlist/xspf.h
* \brief XSPF playlist import: prototypes, datatypes, defines
...
...
@@ -60,3 +63,5 @@ typedef struct
vlc_bool_t
(
*
cmplx
)
COMPLEX_INTERFACE
;
}
pf_handler
;
}
xml_elem_hnd_t
;
#endif
/* _XSPF_H_ */
modules/gui/wxwidgets/dialogs/playlist.cpp
View file @
aa340922
...
...
@@ -1307,12 +1307,12 @@ bool PlaylistFileDropTarget::OnDropFiles( wxCoord x, wxCoord y,
/* Put the items in the playlist node */
for
(
size_t
i
=
0
;
i
<
filenames
.
GetCount
();
i
++
)
{
c
onst
c
har
*
psz_utf8
=
wxDnDFromLocale
(
filenames
[
i
]
);
char
*
psz_utf8
=
wxDnDFromLocale
(
filenames
[
i
]
);
playlist_item_t
*
p_item
=
playlist_ItemNew
(
p
->
p_playlist
,
psz_utf8
,
psz_utf8
);
playlist_NodeAddItem
(
p
->
p_playlist
,
p_item
,
p
->
i_current_view
,
p_dest
,
PLAYLIST_PREPARSE
,
i_pos
);
wxDnDLocaleFree
(
(
char
*
)
psz_utf8
);
wxDnDLocaleFree
(
psz_utf8
);
}
/* FIXME: having this Rebuild() is dirty */
...
...
modules/misc/xml/libxml.c
View file @
aa340922
...
...
@@ -120,9 +120,6 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *p_stream )
xml_reader_t
*
p_reader
;
xml_reader_sys_t
*
p_sys
;
xmlTextReaderPtr
p_libxml_reader
;
xmlParserInputBufferPtr
p_read_context
;
p_read_context
=
malloc
(
sizeof
(
xmlParserInputBuffer
)
);
p_libxml_reader
=
xmlReaderForIO
(
StreamRead
,
NULL
,
p_stream
,
NULL
,
NULL
,
0
);
...
...
@@ -216,7 +213,7 @@ static char *ReaderName( xml_reader_t *p_reader )
const
xmlChar
*
psz_name
=
xmlTextReaderConstName
(
p_reader
->
p_sys
->
p_reader
);
if
(
psz_name
)
return
strdup
(
psz_name
);
if
(
psz_name
)
return
strdup
(
(
const
char
*
)
psz_name
);
else
return
0
;
}
...
...
@@ -225,7 +222,7 @@ static char *ReaderValue( xml_reader_t *p_reader )
const
xmlChar
*
psz_value
=
xmlTextReaderConstValue
(
p_reader
->
p_sys
->
p_reader
);
if
(
psz_value
)
return
strdup
(
psz_value
);
if
(
psz_value
)
return
strdup
(
(
const
char
*
)
psz_value
);
else
return
0
;
}
...
...
src/input/input.c
View file @
aa340922
...
...
@@ -2041,8 +2041,8 @@ static int InputSourceInit( input_thread_t *p_input,
{
psz_path
=
psz_mrl
;
msg_Dbg
(
p_input
,
"trying to pre-parse %s"
,
psz_path
);
psz_demux
=
strdup
(
""
)
;
psz_access
=
strdup
(
"file"
)
;
psz_demux
=
""
;
psz_access
=
"file"
;
}
if
(
in
->
p_demux
)
...
...
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