From e7da13ed86f4bdd11ae98104d21962fadc7e6aae Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 6 Aug 2012 17:47:10 +0200 Subject: image_writer: never pass anamorphic images to image writer --- image_writer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/image_writer.c b/image_writer.c index f3c65411e4..6501e2d8bd 100644 --- a/image_writer.c +++ b/image_writer.c @@ -209,6 +209,7 @@ int write_image(struct mp_image *image, const struct mp_csp_details *csp, struct mp_image *allocated_image = NULL; const int destfmt = IMGFMT_RGB24; struct image_writer_opts defs = image_writer_opts_defaults; + bool is_anamorphic = image->w != image->width || image->h != image->height; if (!opts) opts = &defs; @@ -216,7 +217,7 @@ int write_image(struct mp_image *image, const struct mp_csp_details *csp, const struct img_writer *writer = get_writer(opts); struct image_writer_ctx ctx = { opts }; - if (image->imgfmt != destfmt) { + if (image->imgfmt != destfmt || is_anamorphic) { struct mp_image *dst = alloc_mpi(image->w, image->h, destfmt); struct SwsContext *sws = sws_getContextFromCmdLine_hq(image->width, -- cgit v1.2.3