changeset 35114:bec9e755fb9b

Fix handling of out-of-order slice rendered frames.
author reimar
date Fri, 21 Sep 2012 20:20:11 +0000
parents 06847bdbe4bc
children 24c022e9d700
files libmpcodecs/vf_screenshot.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_screenshot.c	Fri Sep 21 18:57:00 2012 +0000
+++ b/libmpcodecs/vf_screenshot.c	Fri Sep 21 20:20:11 2012 +0000
@@ -138,6 +138,7 @@
 
 static void start_slice(struct vf_instance *vf, mp_image_t *mpi)
 {
+    mpi->priv=
     vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
         mpi->type, mpi->flags, mpi->width, mpi->height);
     if (vf->priv->shot) {
@@ -188,10 +189,7 @@
 {
     mp_image_t *dmpi = (mp_image_t *)mpi->priv;
 
-    if (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)
-      dmpi = vf->dmpi;
-    else
-    if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
+    if(!(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK))){
         dmpi=vf_get_image(vf->next,mpi->imgfmt,
                                     MP_IMGTYPE_EXPORT, 0,
                                     mpi->width, mpi->height);