aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-12-28 14:05:28 +0100
committerGravatar wm4 <wm4@nowhere>2014-12-28 14:06:56 +0100
commit9270dda50a4059cfc063714cd4f6dfdaf305f532 (patch)
treeb938f8417b4a25bfc95b6f0f96cc2d895895c911 /video
parentf808d9689e10c81f3335c71b14eb777dd3de5b38 (diff)
screenshots: set AVFrame parameters
Currently, libavcodec is rather lenient, but it might get stricter in the future. Fixes #1398.
Diffstat (limited to 'video')
-rw-r--r--video/image_writer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/image_writer.c b/video/image_writer.c
index e8f10978cd..03f164bf91 100644
--- a/video/image_writer.c
+++ b/video/image_writer.c
@@ -128,6 +128,9 @@ static int write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp)
pic->data[n] = image->planes[n];
pic->linesize[n] = image->stride[n];
}
+ pic->format = avctx->pix_fmt;
+ pic->width = avctx->width;
+ pic->height = avctx->height;
int ret = avcodec_encode_video2(avctx, &pkt, pic, &got_output);
if (ret < 0)
goto error_exit;