Commit 712e51bd authored by Jean-Paul Saman's avatar Jean-Paul Saman

rawvideo: pictures are of type DIRECT_MEMORY

cleanup commit-id: dfa08f13
parent 02e90c97
......@@ -134,7 +134,7 @@ static int OpenDecoder( vlc_object_t *p_this )
return VLC_ENOMEM;
/* Misc init */
p_dec->p_sys->b_packetizer = false;
p_sys->b_invert = 0;
p_sys->b_invert = false;
if( (int)p_dec->fmt_in.video.i_height < 0 )
{
......@@ -213,7 +213,6 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_block = *pp_block;
if( !p_block->i_pts && !p_block->i_dts && !date_Get( &p_sys->pts ) )
{
/* We've just started the stream, wait for the first PTS. */
......@@ -268,12 +267,13 @@ static void FillPicture( decoder_t *p_dec, block_t *p_block, picture_t *p_pic )
int i_plane;
decoder_sys_t *p_sys = p_dec->p_sys;
if( p_pic->i_type == MEMORY_PICTURE )
if( p_pic->i_type == DIRECT_PICTURE )
{
free( p_pic->p_data_orig );
p_pic->p_data_orig = p_block;
p_pic->p_data = p_pic->p_data_orig = p_block->p_buffer;
p_pic->p_data = p_block->p_buffer;
p_block->p_buffer = NULL;
p_block->i_buffer = 0;
/* Fill the p_pixels field for each plane */
p_pic->p[0].p_pixels = p_pic->p_data;
......@@ -302,7 +302,6 @@ static void FillPicture( decoder_t *p_dec, block_t *p_block, picture_t *p_pic )
p_dst += i_pitch, p_src += i_visible_pitch )
vlc_memcpy( p_dst, p_src, i_visible_pitch );
}
block_Release( p_block );
}
}
......@@ -327,6 +326,7 @@ static picture_t *DecodeFrame( decoder_t *p_dec, block_t *p_block )
p_pic->date = date_Get( &p_sys->pts );
p_pic->b_progressive = true;
block_Release( p_block );
return 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