summaryrefslogtreecommitdiffstats
path: root/screenshot.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2011-10-06 20:46:02 +0200
committerwm4 <wm4@mplayer2.org>2012-01-18 04:45:27 +0100
commit316658ad4883230b4fe362f9edaa1e3b3ad80197 (patch)
tree0bcb0429d0cd2e5191ed1c6e010036e487619c70 /screenshot.c
parent09cdd1406d5abe60bce57c7c2c3e71abe4330053 (diff)
downloadmpv-316658ad4883230b4fe362f9edaa1e3b3ad80197.tar.bz2
mpv-316658ad4883230b4fe362f9edaa1e3b3ad80197.tar.xz
screenshot: add png compression setting
The default compression setting is 7, which is hopefully a good balance between speed of compression, and resulting file sizes. The maximum png compression will be very slow even on fast computers. On the other hand, the lowest compression setting produces files of several MB size with normal video resolutions, which should be avoided as well.
Diffstat (limited to 'screenshot.c')
-rw-r--r--screenshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/screenshot.c b/screenshot.c
index 3fe2bf4866..5844f00ab6 100644
--- a/screenshot.c
+++ b/screenshot.c
@@ -106,7 +106,7 @@ static int write_png(screenshot_ctx *ctx, struct mp_image *image)
avctx->width = image->width;
avctx->height = image->height;
avctx->pix_fmt = PIX_FMT_RGB24;
- avctx->compression_level = 0;
+ avctx->compression_level = ctx->mpctx->opts.screenshot_png_compression;
size_t outbuffer_size = image->width * image->height * 3 * 2;
outbuffer = malloc(outbuffer_size);