diff options
author | zuxy <zuxy@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-04-20 04:33:00 +0000 |
---|---|---|
committer | zuxy <zuxy@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-04-20 04:33:00 +0000 |
commit | 6fe158d7e74d7fc6b23da1605be9aa7bbb187859 (patch) | |
tree | 2fe136d3b3a4acb5c74e7a9642f474c3a6931f3d /libmpcodecs/vd_dmo.c | |
parent | 57b5a5cf652922d167958ce35a4a8c8ccb287e1f (diff) | |
download | mpv-6fe158d7e74d7fc6b23da1605be9aa7bbb187859.tar.bz2 mpv-6fe158d7e74d7fc6b23da1605be9aa7bbb187859.tar.xz |
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
Diffstat (limited to 'libmpcodecs/vd_dmo.c')
-rw-r--r-- | libmpcodecs/vd_dmo.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |