Commit ba6ca830 authored by Jean-Paul Saman's avatar Jean-Paul Saman
Browse files

Remove silly out of memory message in an out of memory situation and fixed...

Remove silly out of memory message in an out of memory situation and fixed indentation on bool declarations.
parent b529170c
...@@ -53,7 +53,7 @@ struct decoder_sys_t ...@@ -53,7 +53,7 @@ struct decoder_sys_t
*/ */
mpeg2dec_t *p_mpeg2dec; mpeg2dec_t *p_mpeg2dec;
const mpeg2_info_t *p_info; const mpeg2_info_t *p_info;
bool b_skip; bool b_skip;
/* /*
* Input properties * Input properties
...@@ -64,13 +64,13 @@ struct decoder_sys_t ...@@ -64,13 +64,13 @@ struct decoder_sys_t
mtime_t i_current_dts; mtime_t i_current_dts;
int i_current_rate; int i_current_rate;
picture_t * p_picture_to_destroy; picture_t * p_picture_to_destroy;
bool b_garbage_pic; bool b_garbage_pic;
bool b_after_sequence_header; /* is it the next frame after bool b_after_sequence_header; /* is it the next frame after
* the sequence header ? */ * the sequence header ? */
bool b_slice_i; /* intra-slice refresh stream */ bool b_slice_i; /* intra-slice refresh stream */
bool b_second_field; bool b_second_field;
bool b_preroll; bool b_preroll;
/* /*
* Output properties * Output properties
...@@ -129,10 +129,7 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -129,10 +129,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 */
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 )
{ return VLC_ENOMEM;
msg_Err( p_dec, "out of memory" );
return VLC_EGENERIC;
}
/* Initialize the thread properties */ /* Initialize the thread properties */
memset( p_sys, 0, sizeof(decoder_sys_t) ); memset( p_sys, 0, sizeof(decoder_sys_t) );
...@@ -325,7 +322,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -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_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. */ /* This picture will never go through display_picture. */
p_pic->date = 0; p_pic->date = 0;
...@@ -525,7 +522,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -525,7 +522,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
break; break;
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic ); 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; p_sys->p_picture_to_destroy = p_pic;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment