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
f5266ccf
Commit
f5266ccf
authored
May 12, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't print a message when an memory error occure and check some malloc return values.
parent
93a5f233
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
56 additions
and
123 deletions
+56
-123
modules/codec/a52.c
modules/codec/a52.c
+1
-4
modules/codec/adpcm.c
modules/codec/adpcm.c
+0
-3
modules/codec/araw.c
modules/codec/araw.c
+2
-8
modules/codec/cc.c
modules/codec/cc.c
+2
-3
modules/codec/cdg.c
modules/codec/cdg.c
+1
-4
modules/codec/cinepak.c
modules/codec/cinepak.c
+3
-4
modules/codec/csri.c
modules/codec/csri.c
+0
-5
modules/codec/cvdsub.c
modules/codec/cvdsub.c
+2
-0
modules/codec/dirac.c
modules/codec/dirac.c
+2
-8
modules/codec/dts.c
modules/codec/dts.c
+1
-4
modules/codec/dvbsub.c
modules/codec/dvbsub.c
+5
-4
modules/codec/faad.c
modules/codec/faad.c
+1
-4
modules/codec/flac.c
modules/codec/flac.c
+1
-7
modules/codec/kate.c
modules/codec/kate.c
+0
-3
modules/codec/lpcm.c
modules/codec/lpcm.c
+1
-4
modules/codec/mash.cpp
modules/codec/mash.cpp
+1
-4
modules/codec/mpeg_audio.c
modules/codec/mpeg_audio.c
+1
-4
modules/codec/png.c
modules/codec/png.c
+3
-4
modules/codec/quicktime.c
modules/codec/quicktime.c
+8
-0
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+3
-4
modules/codec/realaudio.c
modules/codec/realaudio.c
+7
-0
modules/codec/sdl_image.c
modules/codec/sdl_image.c
+1
-4
modules/codec/speex.c
modules/codec/speex.c
+2
-8
modules/codec/tarkin.c
modules/codec/tarkin.c
+1
-4
modules/codec/telx.c
modules/codec/telx.c
+0
-3
modules/codec/theora.c
modules/codec/theora.c
+2
-8
modules/codec/twolame.c
modules/codec/twolame.c
+1
-4
modules/codec/vorbis.c
modules/codec/vorbis.c
+2
-8
modules/codec/x264.c
modules/codec/x264.c
+2
-0
modules/codec/zvbi.c
modules/codec/zvbi.c
+0
-3
No files found.
modules/codec/a52.c
View file @
f5266ccf
...
...
@@ -124,10 +124,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Misc init */
p_sys
->
b_packetizer
=
false
;
...
...
modules/codec/adpcm.c
View file @
f5266ccf
...
...
@@ -167,10 +167,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
}
switch
(
p_dec
->
fmt_in
.
i_codec
)
{
...
...
modules/codec/araw.c
View file @
f5266ccf
...
...
@@ -227,10 +227,7 @@ static int DecoderOpen( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_sys
->
p_logtos16
=
NULL
;
...
...
@@ -1424,10 +1421,7 @@ static int EncoderOpen( vlc_object_t *p_this )
/* Allocate the memory needed to store the encoder's structure */
if
(
(
p_enc
->
p_sys
=
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_enc
->
pf_encode_audio
=
EncoderEncode
;
p_enc
->
fmt_in
.
i_codec
=
p_enc
->
fmt_out
.
i_codec
;
...
...
modules/codec/cc.c
View file @
f5266ccf
...
...
@@ -199,10 +199,7 @@ static int Open( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
if
(
p_sys
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
}
/* init of p_sys */
memset
(
p_sys
,
0
,
sizeof
(
*
p_sys
)
);
...
...
@@ -1110,6 +1107,8 @@ static char *Eia608Text( eia608_t *h, bool b_html )
/* We allocate a buffer big enough for normal case */
psz
=
malloc
(
i_size
);
if
(
!
psz
)
return
NULL
;
*
psz
=
'\0'
;
if
(
b_html
)
Eia608Strlcat
(
psz
,
"<text>"
,
i_size
);
...
...
modules/codec/cdg.c
View file @
f5266ccf
...
...
@@ -103,10 +103,7 @@ static int Open( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
));
if
(
!
p_sys
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Init */
memset
(
p_sys
,
0
,
sizeof
(
*
p_sys
)
);
...
...
modules/codec/cinepak.c
View file @
f5266ccf
...
...
@@ -116,10 +116,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
memset
(
&
p_sys
->
context
,
0
,
sizeof
(
cinepak_context_t
)
);
var_Create
(
p_dec
,
"grayscale"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
...
...
@@ -448,6 +445,8 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
{
p_context
->
p_pix
[
i
]
=
malloc
(
p_context
->
i_stride
[
i
]
*
p_context
->
i_lines
[
i
]
);
if
(
p_context
->
p_pix
[
i
]
==
NULL
)
return
-
1
;
/* Set it to all black */
memset
(
p_context
->
p_pix
[
i
],
(
i
==
0
)
?
0
:
128
,
p_context
->
i_stride
[
i
]
*
p_context
->
i_lines
[
i
]
);
...
...
modules/codec/csri.c
View file @
f5266ccf
...
...
@@ -126,10 +126,7 @@ static int Create( vlc_object_t *p_this )
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
if
(
!
p_sys
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
}
memset
(
&
p_dec
->
p_sys
->
fmt_cached
,
0
,
sizeof
(
p_dec
->
p_sys
->
fmt_cached
)
);
p_sys
->
pf_push_packet
=
p_streamext
->
push_packet
;
...
...
@@ -180,7 +177,6 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_spu
->
p_sys
=
malloc
(
sizeof
(
subpicture_sys_t
));
if
(
!
p_spu
->
p_sys
)
{
msg_Err
(
p_dec
,
"out of memory"
);
p_dec
->
pf_spu_buffer_del
(
p_dec
,
p_spu
);
block_Release
(
*
pp_block
);
*
pp_block
=
NULL
;
...
...
@@ -192,7 +188,6 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_spu
->
p_sys
->
p_subs_data
=
malloc
(
p_block
->
i_buffer
);
if
(
!
p_spu
->
p_sys
->
p_subs_data
)
{
msg_Err
(
p_dec
,
"out of memory"
);
free
(
p_spu
->
p_sys
);
p_dec
->
pf_spu_buffer_del
(
p_dec
,
p_spu
);
block_Release
(
*
pp_block
);
...
...
modules/codec/cvdsub.c
View file @
f5266ccf
...
...
@@ -117,6 +117,8 @@ static int DecoderOpen( vlc_object_t *p_this )
}
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
p_sys
->
b_packetizer
=
false
;
...
...
modules/codec/dirac.c
View file @
f5266ccf
...
...
@@ -110,10 +110,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_sys
->
p_dirac
=
p_dirac
;
...
...
@@ -345,10 +342,7 @@ static int OpenEncoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
memset
(
p_sys
,
0
,
sizeof
(
encoder_sys_t
)
);
p_enc
->
p_sys
=
p_sys
;
...
...
modules/codec/dts.c
View file @
f5266ccf
...
...
@@ -124,10 +124,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Misc init */
p_sys
->
b_packetizer
=
false
;
...
...
modules/codec/dvbsub.c
View file @
f5266ccf
...
...
@@ -303,10 +303,7 @@ static int Open( vlc_object_t *p_this )
p_dec
->
pf_decode_sub
=
Decode
;
p_sys
=
p_dec
->
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
if
(
!
p_sys
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
}
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
p_sys
->
i_pts
=
(
mtime_t
)
0
;
...
...
@@ -634,7 +631,9 @@ static void decode_clut( decoder_t *p_dec, bs_t *s )
#ifdef DEBUG_DVBSUB
msg_Dbg
(
p_dec
,
"new clut: %i"
,
i_id
);
#endif
p_clut
=
malloc
(
sizeof
(
dvbsub_clut_t
)
);
p_clut
=
malloc
(
sizeof
(
dvbsub_clut_t
)
);
if
(
!
p_clut
)
return
;
p_clut
->
p_next
=
p_sys
->
p_cluts
;
p_sys
->
p_cluts
=
p_clut
;
}
...
...
@@ -772,6 +771,8 @@ static void decode_page_composition( decoder_t *p_dec, bs_t *s )
#endif
/* Allocate a new page */
p_sys
->
p_page
=
malloc
(
sizeof
(
dvbsub_page_t
)
);
if
(
!
p_sys
->
p_page
)
return
;
}
p_sys
->
p_page
->
i_version
=
i_version
;
...
...
modules/codec/faad.c
View file @
f5266ccf
...
...
@@ -127,10 +127,7 @@ static int Open( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Open a faad context */
if
(
(
p_sys
->
hfaad
=
faacDecOpen
()
)
==
NULL
)
...
...
modules/codec/flac.c
View file @
f5266ccf
...
...
@@ -214,10 +214,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
}
/* Misc init */
aout_DateSet
(
&
p_sys
->
end_date
,
0
);
...
...
@@ -1230,10 +1227,7 @@ static int OpenEncoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_enc
->
p_sys
=
p_sys
;
p_enc
->
pf_encode_audio
=
Encode
;
p_enc
->
fmt_out
.
i_codec
=
VLC_FOURCC
(
'f'
,
'l'
,
'a'
,
'c'
);
...
...
modules/codec/kate.c
View file @
f5266ccf
...
...
@@ -159,10 +159,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
}
/* init of p_sys */
#ifdef ENABLE_PACKETIZER
...
...
modules/codec/lpcm.c
View file @
f5266ccf
...
...
@@ -113,10 +113,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Misc init */
p_sys
->
b_packetizer
=
false
;
...
...
modules/codec/mash.cpp
View file @
f5266ccf
...
...
@@ -97,10 +97,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Misc init */
p_sys
->
i_pts
=
0
;
p_sys
->
b_inited
=
false
;
...
...
modules/codec/mpeg_audio.c
View file @
f5266ccf
...
...
@@ -152,10 +152,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Misc init */
p_sys
->
b_packetizer
=
false
;
...
...
modules/codec/png.c
View file @
f5266ccf
...
...
@@ -79,10 +79,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Set output properties */
p_dec
->
fmt_out
.
i_cat
=
VIDEO_ES
;
...
...
@@ -217,6 +214,8 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* Decode picture */
p_row_pointers
=
malloc
(
sizeof
(
png_bytep
)
*
i_height
);
if
(
!
p_row_pointers
)
goto
error
;
for
(
i
=
0
;
i
<
(
int
)
i_height
;
i
++
)
p_row_pointers
[
i
]
=
p_pic
->
p
->
p_pixels
+
p_pic
->
p
->
i_pitch
*
i
;
...
...
modules/codec/quicktime.c
View file @
f5266ccf
...
...
@@ -462,6 +462,8 @@ static int OpenAudio( decoder_t *p_dec )
p_sys
->
i_buffer
=
0
;
p_sys
->
i_buffer_size
=
100
*
1000
;
p_sys
->
p_buffer
=
malloc
(
p_sys
->
i_buffer_size
);
if
(
!
p_sys
->
p_buffer
)
goto
exit_error
;
p_sys
->
i_out
=
0
;
p_sys
->
i_out_frames
=
0
;
...
...
@@ -621,6 +623,8 @@ static aout_buffer_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
static
int
OpenVideo
(
decoder_t
*
p_dec
)
{
decoder_sys_t
*
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
#ifndef WIN32
vlc_mutex_t
*
lock
;
...
...
@@ -716,6 +720,8 @@ static int OpenVideo( decoder_t *p_dec )
/* codec data FIXME use codec not SVQ3 */
msg_Dbg
(
p_dec
,
"vide = %d"
,
i_vide
);
id
=
malloc
(
sizeof
(
ImageDescription
)
+
(
i_vide
-
70
)
);
if
(
!
id
)
goto
exit_error
;
id
->
idSize
=
sizeof
(
ImageDescription
)
+
(
i_vide
-
70
);
id
->
cType
=
FCC
(
fcc
[
0
],
fcc
[
1
],
fcc
[
2
],
fcc
[
3
]
);
id
->
version
=
GetWBE
(
p_vide
+
0
);
...
...
@@ -752,6 +758,8 @@ static int OpenVideo( decoder_t *p_dec )
memcpy
(
*
p_sys
->
framedescHandle
,
id
,
id
->
idSize
);
p_sys
->
plane
=
malloc
(
p_dec
->
fmt_in
.
video
.
i_width
*
p_dec
->
fmt_in
.
video
.
i_height
*
3
);
if
(
!
p_sys
->
plane
)
goto
exit_error
;
i_result
=
p_sys
->
QTNewGWorldFromPtr
(
&
p_sys
->
OutBufferGWorld
,
/*pixel format of new GWorld==YUY2 */
...
...
modules/codec/rawvideo.c
View file @
f5266ccf
...
...
@@ -132,10 +132,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Misc init */
p_dec
->
p_sys
->
b_packetizer
=
false
;
p_sys
->
i_pts
=
0
;
...
...
@@ -338,6 +335,8 @@ static block_t *SendFrame( decoder_t *p_dec, block_t *p_block )
}
p_tmp
=
malloc
(
pic
.
p
[
0
].
i_pitch
);
if
(
!
p_tmp
)
return
p_block
;
p_pixels
=
p_block
->
p_buffer
;
for
(
i
=
0
;
i
<
pic
.
i_planes
;
i
++
)
{
...
...
modules/codec/realaudio.c
View file @
f5266ccf
...
...
@@ -201,6 +201,8 @@ static int Open( vlc_object_t *p_this )
}
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
/* Flavor for SIPR codecs */
...
...
@@ -236,6 +238,11 @@ static int Open( vlc_object_t *p_this )
p_dec
->
pf_decode_audio
=
Decode
;
p_sys
->
p_out
=
malloc
(
4096
*
10
);
if
(
!
p_sys
->
p_out
)
{
free
(
p_sys
);
return
VLC_ENOMEM
;
}
p_sys
->
i_out
=
0
;
return
VLC_SUCCESS
;
...
...
modules/codec/sdl_image.c
View file @
f5266ccf
...
...
@@ -108,10 +108,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_sys
->
psz_sdl_type
=
p_supported_fmt
[
i
].
psz_sdl_type
;
/* Set output properties - this is a decoy and isn't used anywhere */
...
...
modules/codec/speex.c
View file @
f5266ccf
...
...
@@ -144,10 +144,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_dec
->
p_sys
->
bits
.
buf_size
=
0
;
p_dec
->
p_sys
->
b_packetizer
=
false
;
p_dec
->
p_sys
->
rtp_rate
=
p_dec
->
fmt_in
.
audio
.
i_rate
;
...
...
@@ -865,10 +862,7 @@ static int OpenEncoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_enc
->
p_sys
=
p_sys
;
p_enc
->
pf_encode_audio
=
Encode
;
p_enc
->
fmt_in
.
i_codec
=
AOUT_FMT_S16_NE
;
...
...
modules/codec/tarkin.c
View file @
f5266ccf
...
...
@@ -101,10 +101,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Set output properties */
p_dec
->
fmt_out
.
i_cat
=
VIDEO_ES
;
...
...
modules/codec/telx.c
View file @
f5266ccf
...
...
@@ -183,10 +183,7 @@ static int Open( vlc_object_t *p_this )
p_dec
->
pf_decode_sub
=
Decode
;
p_sys
=
p_dec
->
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
if
(
p_sys
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_ENOMEM
;
}
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
...
...
modules/codec/theora.c
View file @
f5266ccf
...
...
@@ -141,10 +141,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_dec
->
p_sys
->
b_packetizer
=
false
;
p_sys
->
i_pts
=
0
;
...
...
@@ -612,10 +609,7 @@ static int OpenEncoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_enc
->
p_sys
=
p_sys
;
p_enc
->
pf_encode_video
=
Encode
;
...
...
modules/codec/twolame.c
View file @
f5266ccf
...
...
@@ -160,10 +160,7 @@ static int OpenEncoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_enc
->
p_sys
=
p_sys
;
p_enc
->
pf_encode_audio
=
Encode
;
...
...
modules/codec/vorbis.c
View file @
f5266ccf
...
...
@@ -244,10 +244,7 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_dec
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
/* Misc init */
aout_DateSet
(
&
p_sys
->
end_date
,
0
);
...
...
@@ -874,10 +871,7 @@ static int OpenEncoder( vlc_object_t *p_this )
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_sys
=
(
encoder_sys_t
*
)
malloc
(
sizeof
(
encoder_sys_t
))
)
==
NULL
)
{
msg_Err
(
p_enc
,
"out of memory"
);
return
VLC_EGENERIC
;
}
return
VLC_ENOMEM
;
p_enc
->
p_sys
=
p_sys
;
p_enc
->
pf_encode_audio
=
Encode
;
...
...
modules/codec/x264.c
View file @
f5266ccf
...
...
@@ -769,6 +769,8 @@ static int Open ( vlc_object_t *p_this )
p_enc
->
pf_encode_video
=
Encode
;
p_enc
->
pf_encode_audio
=
NULL
;
p_enc
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
encoder_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
p_sys
->
i_interpolated_dts
=
0
;
p_sys
->
psz_stat_name
=
NULL
;
...
...
modules/codec/zvbi.c
View file @
f5266ccf
...
...
@@ -388,10 +388,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
p_pic
=
(
picture_t
*
)
malloc
(
sizeof
(
picture_t
)
);
if
(
!
p_pic
)
{
msg_Err
(
p_dec
,
"out of memory"
);
goto
error
;
}
memset
(
&
fmt_in
,
0
,
sizeof
(
video_format_t
)
);
memset
(
p_pic
,
0
,
sizeof
(
picture_t
)
);
...
...
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