Commit 4d21a276 authored by Rafaël Carré's avatar Rafaël Carré

avcodec EncodeVideo(): reduce indentation level

Also fix indentation (4 spaces)
parent 068f7eea
......@@ -812,7 +812,6 @@ error:
static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
{
encoder_sys_t *p_sys = p_enc->p_sys;
AVFrame frame;
int i_out, i_plane;
/* Initialize the video output buffer the first time.
......@@ -834,8 +833,9 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
return NULL;
}
memset( &frame, 0, sizeof( AVFrame ) );
if( likely(p_pict) ) {
AVFrame frame;
memset( &frame, 0, sizeof( AVFrame ) );
for( i_plane = 0; i_plane < p_pict->i_planes; i_plane++ )
{
frame.data[i_plane] = p_pict->p[i_plane].p_pixels;
......@@ -937,8 +937,9 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
p_sys->i_buffer_out, NULL);
}
if( i_out > 0 )
{
if( i_out <= 0 )
return NULL;
block_t *p_block = block_New( p_enc, i_out );
memcpy( p_block->p_buffer, p_sys->p_buffer_out, i_out );
......@@ -1012,9 +1013,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
}
return p_block;
}
return NULL;
}
/****************************************************************************
......
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