[vlc-devel] commit: Remove silly out of memory message in an out of memory situation and fixed indentation on bool declarations . (Jean-Paul Saman )
git version control
git at videolan.org
Thu Apr 24 19:14:49 CEST 2008
vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Tue Apr 22 16:26:11 2008 +0200| [ba6ca8303f7a96d4fbf247cadc64c7b9efd05263]
Remove silly out of memory message in an out of memory situation and fixed indentation on bool declarations.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba6ca8303f7a96d4fbf247cadc64c7b9efd05263
---
modules/codec/libmpeg2.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
index ac78b84..696c808 100644
--- a/modules/codec/libmpeg2.c
+++ b/modules/codec/libmpeg2.c
@@ -53,7 +53,7 @@ struct decoder_sys_t
*/
mpeg2dec_t *p_mpeg2dec;
const mpeg2_info_t *p_info;
- bool b_skip;
+ bool b_skip;
/*
* Input properties
@@ -64,13 +64,13 @@ struct decoder_sys_t
mtime_t i_current_dts;
int i_current_rate;
picture_t * p_picture_to_destroy;
- bool b_garbage_pic;
- bool b_after_sequence_header; /* is it the next frame after
+ bool b_garbage_pic;
+ bool b_after_sequence_header; /* is it the next frame after
* the sequence header ? */
- bool b_slice_i; /* intra-slice refresh stream */
- bool b_second_field;
+ bool b_slice_i; /* intra-slice refresh stream */
+ bool b_second_field;
- bool b_preroll;
+ bool b_preroll;
/*
* Output properties
@@ -129,10 +129,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;
/* Initialize the thread properties */
memset( p_sys, 0, sizeof(decoder_sys_t) );
@@ -325,7 +322,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
}
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
- mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
+ mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
/* This picture will never go through display_picture. */
p_pic->date = 0;
@@ -525,7 +522,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
break;
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
- mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
+ mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
}
p_sys->p_picture_to_destroy = p_pic;
More information about the vlc-devel
mailing list