From 3e35fecf1fd3b68039d3e5eb0329a2b8f2025fec Mon Sep 17 00:00:00 2001 From: handbrake Date: Tue, 14 May 2013 19:06:41 +0000 Subject: [PATCH] fix for allocation according the needed sizes git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/qsv@5455 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/enc_qsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c index a7fe62dcd..327256ce0 100644 --- a/libhb/enc_qsv.c +++ b/libhb/enc_qsv.c @@ -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; -- 2.40.0