From 3d09bd77dd7c66737a3702b01f63c243d9c97aad Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 9 Feb 2016 13:24:04 +0100 Subject: image_writer: take care of prediction_method deprecation The field was recently deprecated, and you're supposed to set the private codec option instead. Not sure if this really works as intended. --- video/image_writer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/image_writer.c b/video/image_writer.c index a65c24d77a..6c1c994f7f 100644 --- a/video/image_writer.c +++ b/video/image_writer.c @@ -22,6 +22,7 @@ #include #include +#include #include "config.h" @@ -111,7 +112,8 @@ static bool write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp } if (ctx->writer->lavc_codec == AV_CODEC_ID_PNG) { avctx->compression_level = ctx->opts->png_compression; - avctx->prediction_method = ctx->opts->png_filter; + av_opt_set_int(avctx, "pred", ctx->opts->png_filter, + AV_OPT_SEARCH_CHILDREN); } if (avcodec_open2(avctx, codec, NULL) < 0) { -- cgit v1.2.3