summaryrefslogtreecommitdiffstats
path: root/video/image_writer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-09 13:24:04 +0100
committerwm4 <wm4@nowhere>2016-02-09 13:24:04 +0100
commit3d09bd77dd7c66737a3702b01f63c243d9c97aad (patch)
treecc7fc51171fc196be79e3e0938b017367e814338 /video/image_writer.c
parent5ca35aafdb985c072ad36acd0ecbbe8b39711e4a (diff)
downloadmpv-3d09bd77dd7c66737a3702b01f63c243d9c97aad.tar.bz2
mpv-3d09bd77dd7c66737a3702b01f63c243d9c97aad.tar.xz
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.
Diffstat (limited to 'video/image_writer.c')
-rw-r--r--video/image_writer.c4
1 files changed, 3 insertions, 1 deletions
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 <libavcodec/avcodec.h>
#include <libavutil/mem.h>
+#include <libavutil/opt.h>
#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) {