diff options
Diffstat (limited to 'player/screenshot.c')
-rw-r--r-- | player/screenshot.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/player/screenshot.c b/player/screenshot.c index dc3cca3d33..b5bd5ea787 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -384,8 +384,9 @@ void screenshot_to_file(struct MPContext *mpctx, const char *filename, int mode, ctx->osd = osd; char *ext = mp_splitext(filename, NULL); - if (ext) - opts.format = ext; + int format = image_writer_format_from_ext(ext); + if (format) + opts.format = format; struct mp_image *image = screenshot_get(mpctx, mode); if (!image) { screenshot_msg(ctx, SMSG_ERR, "Taking screenshot failed."); |