[vlc-commits] AVcodec: correctly allocate AVFrame
Jean-Baptiste Kempf
git at videolan.org
Fri Oct 19 16:14:08 CEST 2012
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Oct 19 16:13:30 2012 +0200| [49eb62fb1ceba4ecd6c092e52069412ca6cc319f] | committer: Jean-Baptiste Kempf
AVcodec: correctly allocate AVFrame
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=49eb62fb1ceba4ecd6c092e52069412ca6cc319f
---
modules/codec/avcodec/encoder.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index a5d10ba..59bfc55 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -868,8 +868,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
block_t *p_block = block_New( p_enc, blocksize );
if( likely(p_pict) ) {
- AVFrame frame;
- memset( &frame, 0, sizeof( AVFrame ) );
+ AVFrame frame = avcodec_alloc_frame();
for( i_plane = 0; i_plane < p_pict->i_planes; i_plane++ )
{
frame.data[i_plane] = p_pict->p[i_plane].p_pixels;
More information about the vlc-commits
mailing list