]> granicus.if.org Git - handbrake/commitdiff
fix for allocation according the needed sizes
authorhandbrake <no-reply@handbrake.fr>
Tue, 14 May 2013 19:06:41 +0000 (19:06 +0000)
committerhandbrake <no-reply@handbrake.fr>
Tue, 14 May 2013 19:06:41 +0000 (19:06 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/qsv@5455 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/enc_qsv.c

index a7fe62dcdfe3e4a043df2b3fe02c36fca605670c..327256ce08dc43d85839205b1e42a975532f998e 100644 (file)
@@ -759,8 +759,8 @@ int encqsvWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
 
                 if(!work_surface->Data.Y){
                     // if nv12 and 422 12bits per pixel
-                    work_surface->Data.Y = calloc( 1, in->plane[0].width *  in->plane[0].height );
-                    work_surface->Data.VU = calloc( 1, in->plane[0].width *  in->plane[0].height / 2 );
+                    work_surface->Data.Y = calloc( 1, qsv_encode->m_mfxVideoParam.mfx.FrameInfo.Width *  qsv_encode->m_mfxVideoParam.mfx.FrameInfo.Height );
+                    work_surface->Data.VU = calloc( 1, qsv_encode->m_mfxVideoParam.mfx.FrameInfo.Width *  qsv_encode->m_mfxVideoParam.mfx.FrameInfo.Height /2);
                     work_surface->Data.Pitch = qsv_encode->m_mfxVideoParam.mfx.FrameInfo.Width;
                 }
                 work_surface->Data.TimeStamp = in->s.start;