From 0c5311f17cb9078f0ddde7c41cad61d00aea4a94 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 22 Dec 2012 21:46:22 +0100 Subject: video: cleanup: replace old mp_image function names mp_image_alloc() also changes argument order compared to alloc_mpi(). The format now comes first, then width/height. --- sub/draw_bmp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sub/draw_bmp.c') diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c index 245d1edd2b..79b44bfa66 100644 --- a/sub/draw_bmp.c +++ b/sub/draw_bmp.c @@ -274,8 +274,8 @@ static void draw_rgba(struct mp_draw_sub_cache **cache, struct mp_rect bb, part->imgs[i].i = talloc_steal(part, sbi); part->imgs[i].a = talloc_steal(part, sba); } else { - free_mp_image(sbi); - free_mp_image(sba); + talloc_free(sbi); + talloc_free(sba); } } } @@ -520,7 +520,7 @@ void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst, if (dst->imgfmt == format) { temp = &dst_region; } else { - temp = alloc_mpi(bb.x1 - bb.x0, bb.y1 - bb.y0, format); + temp = mp_image_alloc(format, bb.x1 - bb.x0, bb.y1 - bb.y0); // temp is always YUV, dst_region not // reduce amount of conversions in YUV case (upsampling/shifting only) if (dst_region.flags & MP_IMGFLAG_YUV) { @@ -538,7 +538,7 @@ void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst, if (temp != &dst_region) { mp_image_swscale(&dst_region, temp, SWS_AREA); // chroma down - free_mp_image(temp); + talloc_free(temp); } } @@ -581,7 +581,7 @@ static void backup_realloc(struct mp_draw_sub_backup *backup, return; talloc_free_children(backup); - backup->image = alloc_mpi(img->w, img->h, img->imgfmt); + backup->image = mp_image_alloc(img->imgfmt, img->w, img->h); talloc_steal(backup, backup->image); for (int p = 0; p < MP_MAX_PLANES; p++) { backup->lines[p] = talloc_array(backup, struct line_ext, -- cgit v1.2.3