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
37a2578c
Commit
37a2578c
authored
Jun 22, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unneeded msg_Err.
Fix potential segfault (check malloc return value).
parent
172e22c2
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
19 additions
and
95 deletions
+19
-95
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+0
-3
modules/audio_output/arts.c
modules/audio_output/arts.c
+0
-3
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+1
-19
modules/audio_output/directx.c
modules/audio_output/directx.c
+0
-3
modules/audio_output/esd.c
modules/audio_output/esd.c
+0
-3
modules/audio_output/file.c
modules/audio_output/file.c
+1
-4
modules/audio_output/hd1000a.cpp
modules/audio_output/hd1000a.cpp
+3
-8
modules/audio_output/jack.c
modules/audio_output/jack.c
+0
-3
modules/audio_output/oss.c
modules/audio_output/oss.c
+0
-3
modules/audio_output/portaudio.c
modules/audio_output/portaudio.c
+0
-3
modules/audio_output/waveout.c
modules/audio_output/waveout.c
+1
-5
modules/codec/avcodec/audio.c
modules/codec/avcodec/audio.c
+9
-7
modules/codec/avcodec/deinterlace.c
modules/codec/avcodec/deinterlace.c
+0
-1
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+1
-4
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+0
-1
modules/codec/cmml/cmml.c
modules/codec/cmml/cmml.c
+0
-1
modules/codec/dmo/dmo.c
modules/codec/dmo/dmo.c
+0
-2
modules/codec/dvbsub.c
modules/codec/dvbsub.c
+0
-3
modules/codec/subtitles/subsdec.c
modules/codec/subtitles/subsdec.c
+0
-3
modules/codec/subtitles/subsusf.c
modules/codec/subtitles/subsusf.c
+0
-3
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+0
-3
modules/demux/mjpeg.c
modules/demux/mjpeg.c
+1
-4
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+0
-3
modules/demux/subtitle.c
modules/demux/subtitle.c
+0
-1
modules/demux/subtitle_asa.c
modules/demux/subtitle_asa.c
+2
-2
No files found.
modules/audio_output/alsa.c
View file @
37a2578c
...
@@ -313,10 +313,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -313,10 +313,7 @@ static int Open( vlc_object_t *p_this )
/* Allocate structures */
/* Allocate structures */
p_aout
->
output
.
p_sys
=
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
p_aout
->
output
.
p_sys
=
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_sys
==
NULL
)
if
(
p_sys
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
p_sys
->
b_playing
=
false
;
p_sys
->
b_playing
=
false
;
p_sys
->
start_date
=
0
;
p_sys
->
start_date
=
0
;
vlc_cond_init
(
p_aout
,
&
p_sys
->
wait
);
vlc_cond_init
(
p_aout
,
&
p_sys
->
wait
);
...
...
modules/audio_output/arts.c
View file @
37a2578c
...
@@ -83,10 +83,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -83,10 +83,7 @@ static int Open( vlc_object_t *p_this )
/* Allocate structure */
/* Allocate structure */
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_sys
==
NULL
)
if
(
p_sys
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
p_aout
->
output
.
p_sys
=
p_sys
;
p_aout
->
output
.
p_sys
=
p_sys
;
i_err
=
arts_init
();
i_err
=
arts_init
();
...
...
modules/audio_output/auhal.c
View file @
37a2578c
...
@@ -161,10 +161,7 @@ static int Open( vlc_object_t * p_this )
...
@@ -161,10 +161,7 @@ static int Open( vlc_object_t * p_this )
/* Allocate structure */
/* Allocate structure */
p_aout
->
output
.
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
p_aout
->
output
.
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_aout
->
output
.
p_sys
==
NULL
)
if
(
p_aout
->
output
.
p_sys
==
NULL
)
{
return
VLC_ENOMEM
;
msg_Err
(
p_aout
,
"out of memory"
);
return
(
VLC_ENOMEM
);
}
p_sys
=
p_aout
->
output
.
p_sys
;
p_sys
=
p_aout
->
output
.
p_sys
;
p_sys
->
i_default_dev
=
0
;
p_sys
->
i_default_dev
=
0
;
...
@@ -649,10 +646,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
...
@@ -649,10 +646,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
i_streams
=
i_param_size
/
sizeof
(
AudioStreamID
);
i_streams
=
i_param_size
/
sizeof
(
AudioStreamID
);
p_streams
=
(
AudioStreamID
*
)
malloc
(
i_param_size
);
p_streams
=
(
AudioStreamID
*
)
malloc
(
i_param_size
);
if
(
p_streams
==
NULL
)
if
(
p_streams
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
return
false
;
return
false
;
}
err
=
AudioDeviceGetProperty
(
p_sys
->
i_selected_dev
,
0
,
FALSE
,
err
=
AudioDeviceGetProperty
(
p_sys
->
i_selected_dev
,
0
,
FALSE
,
kAudioDevicePropertyStreams
,
kAudioDevicePropertyStreams
,
...
@@ -685,10 +679,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
...
@@ -685,10 +679,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
i_formats
=
i_param_size
/
sizeof
(
AudioStreamBasicDescription
);
i_formats
=
i_param_size
/
sizeof
(
AudioStreamBasicDescription
);
p_format_list
=
(
AudioStreamBasicDescription
*
)
malloc
(
i_param_size
);
p_format_list
=
(
AudioStreamBasicDescription
*
)
malloc
(
i_param_size
);
if
(
p_format_list
==
NULL
)
if
(
p_format_list
==
NULL
)
{
msg_Err
(
p_aout
,
"could not malloc the memory"
);
continue
;
continue
;
}
err
=
AudioStreamGetProperty
(
p_streams
[
i
],
0
,
err
=
AudioStreamGetProperty
(
p_streams
[
i
],
0
,
kAudioStreamPropertyPhysicalFormats
,
kAudioStreamPropertyPhysicalFormats
,
...
@@ -951,10 +942,7 @@ static void Probe( aout_instance_t * p_aout )
...
@@ -951,10 +942,7 @@ static void Probe( aout_instance_t * p_aout )
/* Allocate DeviceID array */
/* Allocate DeviceID array */
p_devices
=
(
AudioDeviceID
*
)
malloc
(
sizeof
(
AudioDeviceID
)
*
p_sys
->
i_devices
);
p_devices
=
(
AudioDeviceID
*
)
malloc
(
sizeof
(
AudioDeviceID
)
*
p_sys
->
i_devices
);
if
(
p_devices
==
NULL
)
if
(
p_devices
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
goto
error
;
goto
error
;
}
/* Populate DeviceID array */
/* Populate DeviceID array */
err
=
AudioHardwareGetProperty
(
kAudioHardwarePropertyDevices
,
err
=
AudioHardwareGetProperty
(
kAudioHardwarePropertyDevices
,
...
@@ -1101,10 +1089,7 @@ static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_
...
@@ -1101,10 +1089,7 @@ static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_
i_streams
=
i_param_size
/
sizeof
(
AudioStreamID
);
i_streams
=
i_param_size
/
sizeof
(
AudioStreamID
);
p_streams
=
(
AudioStreamID
*
)
malloc
(
i_param_size
);
p_streams
=
(
AudioStreamID
*
)
malloc
(
i_param_size
);
if
(
p_streams
==
NULL
)
if
(
p_streams
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
err
=
AudioDeviceGetProperty
(
i_dev_id
,
0
,
FALSE
,
err
=
AudioDeviceGetProperty
(
i_dev_id
,
0
,
FALSE
,
kAudioDevicePropertyStreams
,
kAudioDevicePropertyStreams
,
...
@@ -1150,10 +1135,7 @@ static int AudioStreamSupportsDigital( aout_instance_t *p_aout, AudioStreamID i_
...
@@ -1150,10 +1135,7 @@ static int AudioStreamSupportsDigital( aout_instance_t *p_aout, AudioStreamID i_
i_formats
=
i_param_size
/
sizeof
(
AudioStreamBasicDescription
);
i_formats
=
i_param_size
/
sizeof
(
AudioStreamBasicDescription
);
p_format_list
=
(
AudioStreamBasicDescription
*
)
malloc
(
i_param_size
);
p_format_list
=
(
AudioStreamBasicDescription
*
)
malloc
(
i_param_size
);
if
(
p_format_list
==
NULL
)
if
(
p_format_list
==
NULL
)
{
msg_Err
(
p_aout
,
"could not malloc the memory"
);
return
false
;
return
false
;
}
err
=
AudioStreamGetProperty
(
i_stream_id
,
0
,
err
=
AudioStreamGetProperty
(
i_stream_id
,
0
,
kAudioStreamPropertyPhysicalFormats
,
kAudioStreamPropertyPhysicalFormats
,
...
...
modules/audio_output/directx.c
View file @
37a2578c
...
@@ -254,10 +254,7 @@ static int OpenAudio( vlc_object_t *p_this )
...
@@ -254,10 +254,7 @@ static int OpenAudio( vlc_object_t *p_this )
/* Allocate structure */
/* Allocate structure */
p_aout
->
output
.
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
p_aout
->
output
.
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_aout
->
output
.
p_sys
==
NULL
)
if
(
p_aout
->
output
.
p_sys
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
/* Initialize some variables */
/* Initialize some variables */
p_aout
->
output
.
p_sys
->
p_dsobject
=
NULL
;
p_aout
->
output
.
p_sys
->
p_dsobject
=
NULL
;
...
...
modules/audio_output/esd.c
View file @
37a2578c
...
@@ -91,10 +91,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -91,10 +91,7 @@ static int Open( vlc_object_t *p_this )
/* Allocate structure */
/* Allocate structure */
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_sys
==
NULL
)
if
(
p_sys
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
p_aout
->
output
.
p_sys
=
p_sys
;
p_aout
->
output
.
p_sys
=
p_sys
;
...
...
modules/audio_output/file.c
View file @
37a2578c
...
@@ -154,10 +154,7 @@ static int Open( vlc_object_t * p_this )
...
@@ -154,10 +154,7 @@ static int Open( vlc_object_t * p_this )
/* Allocate structure */
/* Allocate structure */
p_aout
->
output
.
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
p_aout
->
output
.
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_aout
->
output
.
p_sys
==
NULL
)
if
(
p_aout
->
output
.
p_sys
==
NULL
)
{
return
VLC_ENOMEM
;
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_EGENERIC
;
}
if
(
!
strcmp
(
psz_name
,
"-"
)
)
if
(
!
strcmp
(
psz_name
,
"-"
)
)
p_aout
->
output
.
p_sys
->
p_file
=
stdout
;
p_aout
->
output
.
p_sys
->
p_file
=
stdout
;
...
...
modules/audio_output/hd1000a.cpp
View file @
37a2578c
...
@@ -97,18 +97,14 @@ static int Open( vlc_object_t * p_this )
...
@@ -97,18 +97,14 @@ static int Open( vlc_object_t * p_this )
p_aout
->
output
.
p_sys
=
p_sys
=
p_aout
->
output
.
p_sys
=
p_sys
=
(
aout_sys_t
*
)
malloc
(
sizeof
(
aout_sys_t
)
);
(
aout_sys_t
*
)
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_aout
->
output
.
p_sys
==
NULL
)
if
(
p_aout
->
output
.
p_sys
==
NULL
)
{
return
VLC_ENOMEM
;
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_EGENERIC
;
}
/* New PCMAudioPlayer */
/* New PCMAudioPlayer */
p_sys
->
pPlayer
=
pPlayer
=
new
PCMAudioPlayer
();
p_sys
->
pPlayer
=
pPlayer
=
new
PCMAudioPlayer
();
if
(
p_sys
->
pPlayer
==
NULL
)
if
(
p_sys
->
pPlayer
==
NULL
)
{
{
msg_Err
(
p_aout
,
"out of memory"
);
free
(
p_sys
);
free
(
p_sys
);
return
VLC_E
GENERIC
;
return
VLC_E
NOMEM
;
}
}
/* Get Buffer Requirements */
/* Get Buffer Requirements */
...
@@ -127,10 +123,9 @@ static int Open( vlc_object_t * p_this )
...
@@ -127,10 +123,9 @@ static int Open( vlc_object_t * p_this )
p_sys
->
ppBuffers
=
(
void
**
)
malloc
(
p_sys
->
nBuffers
*
sizeof
(
void
*
)
);
p_sys
->
ppBuffers
=
(
void
**
)
malloc
(
p_sys
->
nBuffers
*
sizeof
(
void
*
)
);
if
(
p_sys
->
ppBuffers
==
NULL
)
if
(
p_sys
->
ppBuffers
==
NULL
)
{
{
msg_Err
(
p_aout
,
"out of memory"
);
delete
pPlayer
;
delete
pPlayer
;
free
(
p_sys
);
free
(
p_sys
);
return
VLC_E
GENERIC
;
return
VLC_E
NOMEM
;
}
}
/* Open PCMAudioPlayer */
/* Open PCMAudioPlayer */
...
...
modules/audio_output/jack.c
View file @
37a2578c
...
@@ -108,7 +108,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -108,7 +108,6 @@ static int Open( vlc_object_t *p_this )
p_sys
=
calloc
(
1
,
sizeof
(
aout_sys_t
)
);
p_sys
=
calloc
(
1
,
sizeof
(
aout_sys_t
)
);
if
(
p_sys
==
NULL
)
if
(
p_sys
==
NULL
)
{
{
msg_Err
(
p_aout
,
"out of memory"
);
status
=
VLC_ENOMEM
;
status
=
VLC_ENOMEM
;
goto
error_out
;
goto
error_out
;
}
}
...
@@ -143,7 +142,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -143,7 +142,6 @@ static int Open( vlc_object_t *p_this )
sizeof
(
jack_port_t
*
)
);
sizeof
(
jack_port_t
*
)
);
if
(
p_sys
->
p_jack_ports
==
NULL
)
if
(
p_sys
->
p_jack_ports
==
NULL
)
{
{
msg_Err
(
p_aout
,
"out of memory"
);
status
=
VLC_ENOMEM
;
status
=
VLC_ENOMEM
;
goto
error_out
;
goto
error_out
;
}
}
...
@@ -152,7 +150,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -152,7 +150,6 @@ static int Open( vlc_object_t *p_this )
sizeof
(
jack_sample_t
*
)
);
sizeof
(
jack_sample_t
*
)
);
if
(
p_sys
->
p_jack_buffers
==
NULL
)
if
(
p_sys
->
p_jack_buffers
==
NULL
)
{
{
msg_Err
(
p_aout
,
"out of memory"
);
status
=
VLC_ENOMEM
;
status
=
VLC_ENOMEM
;
goto
error_out
;
goto
error_out
;
}
}
...
...
modules/audio_output/oss.c
View file @
37a2578c
...
@@ -279,10 +279,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -279,10 +279,7 @@ static int Open( vlc_object_t *p_this )
/* Allocate structure */
/* Allocate structure */
p_aout
->
output
.
p_sys
=
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
p_aout
->
output
.
p_sys
=
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_sys
==
NULL
)
if
(
p_sys
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
/* Get device name */
/* Get device name */
if
(
(
psz_device
=
config_GetPsz
(
p_aout
,
"dspdev"
))
==
NULL
)
if
(
(
psz_device
=
config_GetPsz
(
p_aout
,
"dspdev"
))
==
NULL
)
...
...
modules/audio_output/portaudio.c
View file @
37a2578c
...
@@ -181,10 +181,7 @@ static int Open( vlc_object_t * p_this )
...
@@ -181,10 +181,7 @@ static int Open( vlc_object_t * p_this )
/* Allocate p_sys structure */
/* Allocate p_sys structure */
p_sys
=
(
aout_sys_t
*
)
malloc
(
sizeof
(
aout_sys_t
)
);
p_sys
=
(
aout_sys_t
*
)
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_sys
==
NULL
)
if
(
p_sys
==
NULL
)
{
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
p_sys
->
p_aout
=
p_aout
;
p_sys
->
p_aout
=
p_aout
;
p_sys
->
p_stream
=
0
;
p_sys
->
p_stream
=
0
;
p_aout
->
output
.
p_sys
=
p_sys
;
p_aout
->
output
.
p_sys
=
p_sys
;
...
...
modules/audio_output/waveout.c
View file @
37a2578c
...
@@ -245,10 +245,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -245,10 +245,7 @@ static int Open( vlc_object_t *p_this )
p_aout
->
output
.
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
p_aout
->
output
.
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
if
(
p_aout
->
output
.
p_sys
==
NULL
)
if
(
p_aout
->
output
.
p_sys
==
NULL
)
{
return
VLC_ENOMEM
;
msg_Err
(
p_aout
,
"out of memory"
);
return
VLC_EGENERIC
;
}
p_aout
->
output
.
pf_play
=
Play
;
p_aout
->
output
.
pf_play
=
Play
;
p_aout
->
b_die
=
false
;
p_aout
->
b_die
=
false
;
...
@@ -411,7 +408,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -411,7 +408,6 @@ static int Open( vlc_object_t *p_this )
if
(
p_aout
->
output
.
p_sys
->
p_silence_buffer
==
NULL
)
if
(
p_aout
->
output
.
p_sys
->
p_silence_buffer
==
NULL
)
{
{
free
(
p_aout
->
output
.
p_sys
);
free
(
p_aout
->
output
.
p_sys
);
msg_Err
(
p_aout
,
"out of memory"
);
return
1
;
return
1
;
}
}
p_aout
->
output
.
p_sys
->
i_repeat_counter
=
0
;
p_aout
->
output
.
p_sys
->
i_repeat_counter
=
0
;
...
...
modules/codec/avcodec/audio.c
View file @
37a2578c
...
@@ -100,7 +100,6 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
...
@@ -100,7 +100,6 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
if
(
(
p_dec
->
p_sys
=
p_sys
=
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
@@ -139,12 +138,15 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
...
@@ -139,12 +138,15 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
p_sys
->
p_context
->
extradata
=
p_sys
->
p_context
->
extradata
=
malloc
(
p_sys
->
p_context
->
extradata_size
+
malloc
(
p_sys
->
p_context
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
FF_INPUT_BUFFER_PADDING_SIZE
);
memcpy
(
p_sys
->
p_context
->
extradata
,
if
(
p_sys
->
p_context
->
extradata
)
(
char
*
)
p_dec
->
fmt_in
.
p_extra
+
i_offset
,
{
p_sys
->
p_context
->
extradata_size
);
memcpy
(
p_sys
->
p_context
->
extradata
,
memset
(
(
char
*
)
p_sys
->
p_context
->
extradata
+
(
char
*
)
p_dec
->
fmt_in
.
p_extra
+
i_offset
,
p_sys
->
p_context
->
extradata_size
,
0
,
p_sys
->
p_context
->
extradata_size
);
FF_INPUT_BUFFER_PADDING_SIZE
);
memset
(
(
char
*
)
p_sys
->
p_context
->
extradata
+
p_sys
->
p_context
->
extradata_size
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
}
}
}
else
else
p_sys
->
p_context
->
extradata
=
NULL
;
p_sys
->
p_context
->
extradata
=
NULL
;
...
...
modules/codec/avcodec/deinterlace.c
View file @
37a2578c
...
@@ -84,7 +84,6 @@ int OpenDeinterlace( vlc_object_t *p_this )
...
@@ -84,7 +84,6 @@ int OpenDeinterlace( vlc_object_t *p_this )
if
(
(
p_filter
->
p_sys
=
p_sys
=
if
(
(
p_filter
->
p_sys
=
p_sys
=
(
filter_sys_t
*
)
malloc
(
sizeof
(
filter_sys_t
))
)
==
NULL
)
(
filter_sys_t
*
)
malloc
(
sizeof
(
filter_sys_t
))
)
==
NULL
)
{
{
msg_Err
(
p_filter
,
"out of memory"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
...
modules/codec/avcodec/encoder.c
View file @
37a2578c
...
@@ -253,10 +253,7 @@ int OpenEncoder( vlc_object_t *p_this )
...
@@ -253,10 +253,7 @@ int OpenEncoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the encoder's structure */
/* Allocate the memory needed to store the encoder's structure */
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
return
VLC_ENOMEM
;
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_EGENERIC
;
}
memset
(
p_sys
,
0
,
sizeof
(
encoder_sys_t
)
);
memset
(
p_sys
,
0
,
sizeof
(
encoder_sys_t
)
);
p_enc
->
p_sys
=
p_sys
;
p_enc
->
p_sys
=
p_sys
;
p_sys
->
p_codec
=
p_codec
;
p_sys
->
p_codec
=
p_codec
;
...
...
modules/codec/avcodec/video.c
View file @
37a2578c
...
@@ -232,7 +232,6 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
...
@@ -232,7 +232,6 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
if
(
(
p_dec
->
p_sys
=
p_sys
=
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
...
...
modules/codec/cmml/cmml.c
View file @
37a2578c
...
@@ -108,7 +108,6 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -108,7 +108,6 @@ static int OpenDecoder( vlc_object_t *p_this )
if
(
(
p_dec
->
p_sys
=
p_sys
=
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
...
modules/codec/dmo/dmo.c
View file @
37a2578c
...
@@ -520,7 +520,6 @@ static int DecOpen( vlc_object_t *p_this )
...
@@ -520,7 +520,6 @@ static int DecOpen( vlc_object_t *p_this )
if
(
(
p_dec
->
p_sys
=
p_sys
=
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
{
msg_Err
(
p_dec
,
"out of memory"
);
goto
error
;
goto
error
;
}
}
...
@@ -1341,7 +1340,6 @@ static int EncOpen( vlc_object_t *p_this )
...
@@ -1341,7 +1340,6 @@ static int EncOpen( vlc_object_t *p_this )
if
(
(
p_enc
->
p_sys
=
p_sys
=
if
(
(
p_enc
->
p_sys
=
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
{
msg_Err
(
p_enc
,
"out of memory"
);
goto
error
;
goto
error
;
}
}
...
...
modules/codec/dvbsub.c
View file @
37a2578c
...
@@ -1664,10 +1664,7 @@ static int OpenEncoder( vlc_object_t *p_this )
...
@@ -1664,10 +1664,7 @@ static int OpenEncoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
p_enc
->
p_sys
=
p_sys
;
p_enc
->
p_sys
=
p_sys
;
p_enc
->
pf_encode_sub
=
Encode
;
p_enc
->
pf_encode_sub
=
Encode
;
...
...
modules/codec/subtitles/subsdec.c
View file @
37a2578c
...
@@ -160,10 +160,7 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -160,10 +160,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
/* Allocate the memory needed to store the decoder's structure */
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
if
(
p_sys
==
NULL
)
if
(
p_sys
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
/* init of p_sys */
/* init of p_sys */
memset
(
p_sys
,
0
,
sizeof
(
*
p_sys
)
);
memset
(
p_sys
,
0
,
sizeof
(
*
p_sys
)
);
...
...
modules/codec/subtitles/subsusf.c
View file @
37a2578c
...
@@ -79,7 +79,6 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -79,7 +79,6 @@ static int OpenDecoder( vlc_object_t *p_this )
if
(
(
p_dec
->
p_sys
=
p_sys
=
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
calloc
(
1
,
sizeof
(
decoder_sys_t
))
)
==
NULL
)
(
decoder_sys_t
*
)
calloc
(
1
,
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
@@ -400,7 +399,6 @@ static subpicture_region_t *CreateTextRegion( decoder_t *p_dec,
...
@@ -400,7 +399,6 @@ static subpicture_region_t *CreateTextRegion( decoder_t *p_dec,
p_text_region
->
psz_html
=
strndup
(
psz_subtitle
,
i_len
);
p_text_region
->
psz_html
=
strndup
(
psz_subtitle
,
i_len
);
if
(
!
p_text_region
->
psz_html
)
if
(
!
p_text_region
->
psz_html
)
{
{
msg_Err
(
p_dec
,
"out of memory"
);
p_spu
->
pf_destroy_region
(
VLC_OBJECT
(
p_dec
),
p_text_region
);
p_spu
->
pf_destroy_region
(
VLC_OBJECT
(
p_dec
),
p_text_region
);
return
NULL
;
return
NULL
;
}
}
...
@@ -649,7 +647,6 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
...
@@ -649,7 +647,6 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
p_style
=
calloc
(
1
,
sizeof
(
ssa_style_t
)
);
p_style
=
calloc
(
1
,
sizeof
(
ssa_style_t
)
);
if
(
!
p_style
)
if
(
!
p_style
)
{
{
msg_Err
(
p_dec
,
"out of memory"
);
free
(
psz_node
);
free
(
psz_node
);
break
;
break
;
}
}
...
...
modules/demux/avi/avi.c
View file @
37a2578c
...
@@ -356,10 +356,7 @@ static int Open( vlc_object_t * p_this )
...
@@ -356,10 +356,7 @@ static int Open( vlc_object_t * p_this )
{
{
avi_track_t
*
tk
=
malloc
(
sizeof
(
avi_track_t
)
);
avi_track_t
*
tk
=
malloc
(
sizeof
(
avi_track_t
)
);
if
(
!
tk
)
if
(
!
tk
)
{
msg_Err
(
p_demux
,
"Out of memory"
);
goto
error
;
goto
error
;
}
avi_chunk_list_t
*
p_strl
=
AVI_ChunkFind
(
p_hdrl
,
AVIFOURCC_strl
,
i
);
avi_chunk_list_t
*
p_strl
=
AVI_ChunkFind
(
p_hdrl
,
AVIFOURCC_strl
,
i
);
avi_chunk_strh_t
*
p_strh
=
AVI_ChunkFind
(
p_strl
,
AVIFOURCC_strh
,
0
);
avi_chunk_strh_t
*
p_strh
=
AVI_ChunkFind
(
p_strl
,
AVIFOURCC_strh
,
0
);
...
...
modules/demux/mjpeg.c
View file @
37a2578c
...
@@ -156,11 +156,8 @@ static char* GetLine( demux_t *p_demux, int *p_pos )
...
@@ -156,11 +156,8 @@ static char* GetLine( demux_t *p_demux, int *p_pos )
i
--
;
i
--
;
}
}
p_line
=
malloc
(
i
+
1
);
p_line
=
malloc
(
i
+
1
);
if
(
NULL
==
p_line
)
if
(
p_line
==
NULL
)
{
msg_Err
(
p_demux
,
"out of memory"
);
return
NULL
;
return
NULL
;
}
strncpy
(
p_line
,
(
char
*
)
p_buf
,
i
);
strncpy
(
p_line
,
(
char
*
)
p_buf
,
i
);
p_line
[
i
]
=
'\0'
;
p_line
[
i
]
=
'\0'
;
// msg_Dbg( p_demux, "i = %d, pos = %d, %s", i, *p_pos, p_line );
// msg_Dbg( p_demux, "i = %d, pos = %d, %s", i, *p_pos, p_line );
...
...
modules/demux/playlist/xspf.c
View file @
37a2578c
...
@@ -545,10 +545,7 @@ static bool parse_track_node COMPLEX_INTERFACE
...
@@ -545,10 +545,7 @@ static bool parse_track_node COMPLEX_INTERFACE
strlen
(
p_demux
->
p_sys
->
psz_base
)
+
strlen
(
p_demux
->
p_sys
->
psz_base
)
+
strlen
(
psz_uri
)
+
1
);
strlen
(
psz_uri
)
+
1
);
if
(
!
psz_tmp
)
if
(
!
psz_tmp
)
{
msg_Err
(
p_demux
,
"out of memory"
);
return
false
;
return
false
;
}
sprintf
(
psz_tmp
,
"%s%s"
,
sprintf
(
psz_tmp
,
"%s%s"
,
p_demux
->
p_sys
->
psz_base
,
psz_uri
);
p_demux
->
p_sys
->
psz_base
,
psz_uri
);
free
(
psz_uri
);
free
(
psz_uri
);
...
...
modules/demux/subtitle.c
View file @
37a2578c
...
@@ -449,7 +449,6 @@ static int Open ( vlc_object_t *p_this )
...
@@ -449,7 +449,6 @@ static int Open ( vlc_object_t *p_this )
if
(
!
(
p_sys
->
subtitle
=
realloc
(
p_sys
->
subtitle
,
if
(
!
(
p_sys
->
subtitle
=
realloc
(
p_sys
->
subtitle
,
sizeof
(
subtitle_t
)
*
i_max
)
)
)
sizeof
(
subtitle_t
)
*
i_max
)
)
)
{
{
msg_Err
(
p_demux
,
"out of memory"
);
free
(
p_sys
->
subtitle
);
free
(
p_sys
->
subtitle
);
TextUnload
(
&
p_sys
->
txt
);
TextUnload
(
&
p_sys
->
txt
);
free
(
p_sys
);
free
(
p_sys
);
...
...
modules/demux/subtitle_asa.c
View file @
37a2578c
...
@@ -140,6 +140,8 @@ static int Open ( vlc_object_t *p_this )
...
@@ -140,6 +140,8 @@ static int Open ( vlc_object_t *p_this )
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
p_sys
->
psz_header
=
NULL
;
p_sys
->
psz_header
=
NULL
;
p_sys
->
i_subtitle
=
0
;
p_sys
->
i_subtitle
=
0
;
p_sys
->
i_subtitles
=
0
;
p_sys
->
i_subtitles
=
0
;
...
@@ -220,7 +222,6 @@ static int Open ( vlc_object_t *p_this )
...
@@ -220,7 +222,6 @@ static int Open ( vlc_object_t *p_this )
p_data
=
malloc
(
i_ssize
);
p_data
=
malloc
(
i_ssize
);
if
(
!
p_data
)
if
(
!
p_data
)
{
{
msg_Err
(
p_demux
,
"out of memory"
);
free
(
p_sys
);
free
(
p_sys
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
@@ -281,7 +282,6 @@ static int ProcessLine( demux_t *p_demux, void *p_arg,
...
@@ -281,7 +282,6 @@ static int ProcessLine( demux_t *p_demux, void *p_arg,
if
(
!
(
p_sys
->
subtitle
=
realloc
(
p_sys
->
subtitle
,
sizeof
(
subtitle_t
)
if
(
!
(
p_sys
->
subtitle
=
realloc
(
p_sys
->
subtitle
,
sizeof
(
subtitle_t
)
*
p_sys
->
i_subs_alloc
)
)
)
*
p_sys
->
i_subs_alloc
)
)
)
{
{
msg_Err
(
p_demux
,
"out of memory"
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
}
}
...
...
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