Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
bfbd38a6
Commit
bfbd38a6
authored
Oct 14, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning (don't a message when the system runs out of memory) and fix a potential segfault.
parent
825bf79e
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
4 additions
and
47 deletions
+4
-47
modules/access/screen/screen.c
modules/access/screen/screen.c
+1
-3
modules/access/v4l2/v4l2.c
modules/access/v4l2/v4l2.c
+0
-3
modules/access_output/rtmp.c
modules/access_output/rtmp.c
+0
-3
modules/control/http/http.c
modules/control/http/http.c
+0
-3
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+0
-7
modules/demux/real.c
modules/demux/real.c
+0
-3
modules/gui/pda/pda_callbacks.c
modules/gui/pda/pda_callbacks.c
+0
-8
modules/misc/notify/notify.c
modules/misc/notify/notify.c
+0
-3
modules/misc/osd/osd_menu.c
modules/misc/osd/osd_menu.c
+0
-3
src/input/stream.c
src/input/stream.c
+3
-11
No files found.
modules/access/screen/screen.c
View file @
bfbd38a6
...
...
@@ -341,9 +341,7 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y,
if
(
!
p_sys
->
p_blend
)
{
p_sys
->
p_blend
=
vlc_object_create
(
p_demux
,
sizeof
(
filter_t
)
);
if
(
!
p_sys
->
p_blend
)
msg_Err
(
p_demux
,
"Could not allocate memory for blending module"
);
else
if
(
p_sys
->
p_blend
)
{
es_format_Init
(
&
p_sys
->
p_blend
->
fmt_in
,
VIDEO_ES
,
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
)
);
...
...
modules/access/v4l2/v4l2.c
View file @
bfbd38a6
...
...
@@ -1717,10 +1717,7 @@ static int InitMmap( demux_t *p_demux, int i_fd )
p_sys
->
p_buffers
=
calloc
(
req
.
count
,
sizeof
(
*
p_sys
->
p_buffers
)
);
if
(
!
p_sys
->
p_buffers
)
{
msg_Err
(
p_demux
,
"Out of memory"
);
goto
open_failed
;
}
for
(
p_sys
->
i_nbuffers
=
0
;
p_sys
->
i_nbuffers
<
req
.
count
;
++
p_sys
->
i_nbuffers
)
{
...
...
modules/access_output/rtmp.c
View file @
bfbd38a6
...
...
@@ -90,10 +90,7 @@ static int Open( vlc_object_t *p_this )
int
i
;
if
(
!
(
p_sys
=
calloc
(
1
,
sizeof
(
sout_access_out_sys_t
)
)
)
)
{
msg_Err
(
p_access
,
"not enough memory"
);
return
VLC_ENOMEM
;
}
p_access
->
p_sys
=
p_sys
;
p_sys
->
p_thread
=
...
...
modules/control/http/http.c
View file @
bfbd38a6
...
...
@@ -263,10 +263,7 @@ static int Open( vlc_object_t *p_this )
/* FIXME: we're leaking h */
httpd_handler_sys_t
*
h
=
malloc
(
sizeof
(
httpd_handler_sys_t
)
);
if
(
!
h
)
{
msg_Err
(
p_intf
,
"not enough memory to allocate album art handler"
);
goto
failed
;
}
h
->
file
.
p_intf
=
p_intf
;
h
->
file
.
file
=
NULL
;
h
->
file
.
name
=
NULL
;
...
...
modules/demux/mp4/libmp4.c
View file @
bfbd38a6
...
...
@@ -1872,10 +1872,7 @@ static int MP4_ReadBox_cmvd( stream_t *p_stream, MP4_Box_t *p_box )
p_box
->
data
.
p_cmvd
->
i_compressed_size
=
i_read
;
if
(
!
(
p_box
->
data
.
p_cmvd
->
p_data
=
malloc
(
i_read
)
)
)
{
msg_Dbg
(
p_stream
,
"read box:
\"
cmvd
\"
not enough memory to load data"
);
return
(
1
);
}
/* now copy compressed data */
memcpy
(
p_box
->
data
.
p_cmvd
->
p_data
,
...
...
@@ -1949,11 +1946,7 @@ static int MP4_ReadBox_cmov( stream_t *p_stream, MP4_Box_t *p_box )
/* decompress data */
/* allocate a new buffer */
if
(
!
(
p_data
=
malloc
(
p_cmvd
->
data
.
p_cmvd
->
i_uncompressed_size
)
)
)
{
msg_Err
(
p_stream
,
"read box:
\"
cmov
\"
not enough memory to "
"uncompress data"
);
return
1
;
}
/* init default structures */
z_data
.
next_in
=
p_cmvd
->
data
.
p_cmvd
->
p_data
;
z_data
.
avail_in
=
p_cmvd
->
data
.
p_cmvd
->
i_compressed_size
;
...
...
modules/demux/real.c
View file @
bfbd38a6
...
...
@@ -931,10 +931,7 @@ static void ReadRealIndex( demux_t *p_demux )
p_sys
->
p_index
=
(
rm_index_t
*
)
malloc
(
sizeof
(
rm_index_t
)
*
(
i_index_count
+
1
)
);
if
(
p_sys
->
p_index
==
NULL
)
{
msg_Err
(
p_demux
,
"Memory allocation error"
);
return
;
}
memset
(
p_sys
->
p_index
,
0
,
sizeof
(
rm_index_t
)
*
(
i_index_count
+
1
)
);
...
...
modules/gui/pda/pda_callbacks.c
View file @
bfbd38a6
...
...
@@ -655,16 +655,12 @@ void onAddCameraToPlaylist(GtkButton *button, gpointer user_data)
ppsz_options
=
(
char
**
)
malloc
(
11
*
sizeof
(
char
*
));
if
(
ppsz_options
==
NULL
)
{
msg_Err
(
p_intf
,
"No memory to allocate for v4l options."
);
return
;
}
for
(
i
=
0
;
i
<
11
;
i
++
)
{
ppsz_options
[
i
]
=
(
char
*
)
malloc
(
VLC_MAX_MRL
*
sizeof
(
char
));
if
(
ppsz_options
[
i
]
==
NULL
)
{
msg_Err
(
p_intf
,
"No memory to allocate for v4l options string %i."
,
i
);
for
(
i
-=
1
;
i
>=
0
;
i
--
)
free
(
ppsz_options
[
i
]);
free
(
ppsz_options
);
...
...
@@ -1021,16 +1017,12 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
ppsz_options
=
(
char
**
)
malloc
(
3
*
sizeof
(
char
*
));
if
(
ppsz_options
==
NULL
)
{
msg_Err
(
p_intf
,
"No memory to allocate for v4l options."
);
return
;
}
for
(
i
=
0
;
i
<
3
;
i
++
)
{
ppsz_options
[
i
]
=
(
char
*
)
malloc
(
VLC_MAX_MRL
*
sizeof
(
char
));
if
(
ppsz_options
[
i
]
==
NULL
)
{
msg_Err
(
p_intf
,
"No memory to allocate for v4l options string %i."
,
i
);
for
(
i
-=
1
;
i
>=
0
;
i
--
)
free
(
ppsz_options
[
i
]);
free
(
ppsz_options
);
...
...
modules/misc/notify/notify.c
View file @
bfbd38a6
...
...
@@ -87,10 +87,7 @@ static int Open( vlc_object_t *p_this )
intf_sys_t
*
p_sys
=
malloc
(
sizeof
(
intf_sys_t
)
);
if
(
!
p_sys
)
{
msg_Err
(
p_intf
,
"Out of memory"
);
return
VLC_ENOMEM
;
}
if
(
!
notify_init
(
APPLICATION_NAME
)
)
{
...
...
modules/misc/osd/osd_menu.c
View file @
bfbd38a6
...
...
@@ -56,10 +56,7 @@ osd_menu_t *osd_MenuNew( osd_menu_t *p_menu, const char *psz_path,
p_menu
->
p_state
=
(
osd_menu_state_t
*
)
malloc
(
sizeof
(
osd_menu_state_t
)
);
if
(
!
p_menu
->
p_state
)
{
msg_Err
(
p_menu
,
"Memory allocation for OSD Menu state failed"
);
return
NULL
;
}
memset
(
p_menu
->
p_state
,
0
,
sizeof
(
osd_menu_state_t
));
if
(
psz_path
!=
NULL
)
...
...
src/input/stream.c
View file @
bfbd38a6
...
...
@@ -460,16 +460,12 @@ stream_t *stream_AccessNew( access_t *p_access, bool b_quick )
p_sys
->
immediate
.
i_end
=
0
;
p_sys
->
immediate
.
p_buffer
=
malloc
(
STREAM_CACHE_SIZE
);
if
(
p_sys
->
immediate
.
p_buffer
==
NULL
)
goto
error
;
msg_Dbg
(
s
,
"p_buffer %p-%p"
,
p_sys
->
immediate
.
p_buffer
,
&
p_sys
->
immediate
.
p_buffer
[
STREAM_CACHE_SIZE
]
);
if
(
p_sys
->
immediate
.
p_buffer
==
NULL
)
{
msg_Err
(
s
,
"Out of memory when allocating stream cache (%d bytes)"
,
STREAM_CACHE_SIZE
);
goto
error
;
}
}
else
{
...
...
@@ -487,11 +483,7 @@ stream_t *stream_AccessNew( access_t *p_access, bool b_quick )
p_sys
->
stream
.
i_tk
=
0
;
p_sys
->
stream
.
p_buffer
=
malloc
(
STREAM_CACHE_SIZE
);
if
(
p_sys
->
stream
.
p_buffer
==
NULL
)
{
msg_Err
(
s
,
"Out of memory when allocating stream cache (%d bytes)"
,
STREAM_CACHE_SIZE
);
goto
error
;
}
p_sys
->
stream
.
i_used
=
0
;
access_Control
(
p_access
,
ACCESS_GET_MTU
,
&
p_sys
->
stream
.
i_read_size
);
...
...
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