diff options
author | wm4 <wm4@nowhere> | 2012-08-06 17:47:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-06 17:47:10 +0200 |
commit | e7da13ed86f4bdd11ae98104d21962fadc7e6aae (patch) | |
tree | b553b48760d4f7c5711377c6751698e2e8e4751f | |
parent | 39593c138d505c0f99a5534d972a9c81fd676c4d (diff) | |
download | mpv-e7da13ed86f4bdd11ae98104d21962fadc7e6aae.tar.bz2 mpv-e7da13ed86f4bdd11ae98104d21962fadc7e6aae.tar.xz |
image_writer: never pass anamorphic images to image writer
-rw-r--r-- | image_writer.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, |