[MPlayer-cvslog] r37523 - trunk/libmpcodecs/vf_screenshot.c

rtogni subversion at mplayerhq.hu
Sat Sep 12 17:18:48 CEST 2015


Author: rtogni
Date: Sat Sep 12 17:18:48 2015
New Revision: 37523

Log:
Fix screenshot generation

Modified:
   trunk/libmpcodecs/vf_screenshot.c

Modified: trunk/libmpcodecs/vf_screenshot.c
==============================================================================
--- trunk/libmpcodecs/vf_screenshot.c	Sat Sep 12 16:25:31 2015	(r37522)
+++ trunk/libmpcodecs/vf_screenshot.c	Sat Sep 12 17:18:48 2015	(r37523)
@@ -110,6 +110,9 @@ static void write_png(struct vf_priv_s *
     av_init_packet(&pkt);
     pkt.data = priv->outbuffer;
     pkt.size = priv->outbuffer_size;
+    priv->pic->width = priv->avctx->width;
+    priv->pic->height = priv->avctx->height;
+    priv->pic->format = priv->avctx->pix_fmt;
     res = avcodec_encode_video2(priv->avctx, &pkt, priv->pic, &got_pkt);
     if (res < 0 || !got_pkt || pkt.size <= 0) {
         mp_msg(MSGT_VFILTER,MSGL_ERR,"\nFailed to encode screenshot %s!\n", fname);


More information about the MPlayer-cvslog mailing list