[vlc-devel] commit: x264: remove unneeded p_buffer (Ilkka Ollakka )
git version control
git at videolan.org
Wed Dec 23 21:29:16 CET 2009
vlc | branch: master | Ilkka Ollakka <ileoo at iki.fi> | Wed Dec 23 22:27:04 2009 +0200| [002746bfd2146e5b9dd698cccf6774ab75d42d56] | committer: Ilkka Ollakka
x264: remove unneeded p_buffer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=002746bfd2146e5b9dd698cccf6774ab75d42d56
---
modules/codec/x264.c | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 66892d0..ee5bd6e 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -670,9 +670,6 @@ struct encoder_sys_t
x264_t *h;
x264_param_t param;
- int i_buffer;
- uint8_t *p_buffer;
-
mtime_t i_interpolated_dts;
char *psz_stat_name;
@@ -712,7 +709,6 @@ static int Open ( vlc_object_t *p_this )
return VLC_ENOMEM;
p_sys->i_interpolated_dts = 0;
p_sys->psz_stat_name = NULL;
- p_sys->p_buffer = NULL;
x264_param_default( &p_sys->param );
p_sys->param.i_width = p_enc->fmt_in.video.i_width;
@@ -1159,16 +1155,6 @@ static int Open ( vlc_object_t *p_this )
return VLC_EGENERIC;
}
- /* alloc mem */
- p_sys->i_buffer = 4 * p_enc->fmt_in.video.i_width *
- p_enc->fmt_in.video.i_height + 1000;
- p_sys->p_buffer = malloc( p_sys->i_buffer );
- if( !p_sys->p_buffer )
- {
- Close( VLC_OBJECT(p_enc) );
- return VLC_ENOMEM;
- }
-
/* get the globals headers */
p_enc->fmt_out.i_extra = 0;
p_enc->fmt_out.p_extra = NULL;
@@ -1224,7 +1210,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
p_block = block_New( p_enc, i_out );
if( !p_block ) return NULL;
- /* copy encoded data directly to block, instead taking via p_sys->p_buffer */
+ /* copy encoded data directly to block */
for( i = 0, i_out = 0; i < i_nal; i++ )
{
memcpy( p_block->p_buffer + i_out, nal[i].p_payload, nal[i].i_payload );
@@ -1311,6 +1297,5 @@ static void Close( vlc_object_t *p_this )
vlc_mutex_unlock( lock.p_address );
#endif
- free( p_sys->p_buffer );
free( p_sys );
}
More information about the vlc-devel
mailing list