diff libvo/vo_png.c @ 37143:88b4aa330150

Ensure dimensions are set before opening libavcodec encoder. This is a requirement that was added some time ago, we so far relied on a hack in libavcodec, but that isn't really a good idea. Only lightly tested.
author reimar
date Sun, 13 Jul 2014 21:39:32 +0000
parents 5d3f93051de9
children
line wrap: on
line diff
--- a/libvo/vo_png.c	Wed Jul 09 23:20:47 2014 +0000
+++ b/libvo/vo_png.c	Sun Jul 13 21:39:32 2014 +0000
@@ -134,6 +134,8 @@
         avctx = avcodec_alloc_context3(NULL);
         avctx->compression_level = z_compression;
         avctx->pix_fmt = imgfmt2pixfmt(format);
+        avctx->width = width;
+        avctx->height = height;
         if (avcodec_open2(avctx, avcodec_find_encoder(AV_CODEC_ID_PNG), NULL) < 0) {
             uninit();
             return -1;