From 6fe158d7e74d7fc6b23da1605be9aa7bbb187859 Mon Sep 17 00:00:00 2001 From: zuxy Date: Tue, 20 Apr 2010 04:33:00 +0000 Subject: Replace memalign(x) (x > 8) by av_malloc() to prevent crashes on systems lacking memalign(), e.g. Win32. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31045 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_dmo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmpcodecs/vd_dmo.c') diff --git a/libmpcodecs/vd_dmo.c b/libmpcodecs/vd_dmo.c index 6866aa202b..ffb0844a6e 100644 --- a/libmpcodecs/vd_dmo.c +++ b/libmpcodecs/vd_dmo.c @@ -83,7 +83,7 @@ static int init(sh_video_t *sh){ if (sh->disp_w & 3) { ctx->stride = ((sh->disp_w * 3) + 3) & ~3; - ctx->buffer = memalign(64, ctx->stride * sh->disp_h); + ctx->buffer = av_malloc(ctx->stride * sh->disp_h); } default: DMO_VideoDecoder_SetDestFmt(ctx->decoder,out_fmt&255,0); // RGB/BGR @@ -97,6 +97,7 @@ static int init(sh_video_t *sh){ static void uninit(sh_video_t *sh){ struct context *ctx = sh->context; DMO_VideoDecoder_Destroy(ctx->decoder); + av_free(ctx->buffer); free(ctx); sh->context = NULL; } -- cgit v1.2.3