[MPlayer-cvslog] r35505 - trunk/libmpcodecs/vd_black.c

upsuper subversion at mplayerhq.hu
Thu Nov 29 05:52:20 CET 2012


Author: upsuper
Date: Thu Nov 29 05:52:19 2012
New Revision: 35505

Log:
Prevent dropping last frames in vd_black.

Modified:
   trunk/libmpcodecs/vd_black.c

Modified: trunk/libmpcodecs/vd_black.c
==============================================================================
--- trunk/libmpcodecs/vd_black.c	Wed Nov 28 20:43:03 2012	(r35504)
+++ trunk/libmpcodecs/vd_black.c	Thu Nov 29 05:52:19 2012	(r35505)
@@ -38,6 +38,7 @@ LIBVD_EXTERN(black)
 typedef struct {
     unsigned char *planes[MP_MAX_PLANES];
     int stride[MP_MAX_PLANES];
+    int buffer_filled;
     int w, h;
 } vd_black_ctx;
 
@@ -166,7 +167,9 @@ static mp_image_t* decode(sh_video_t *sh
     vd_black_ctx *ctx = sh->context;
     int i;
 
-    if (sh->num_buffered_pts != FF_ARRAY_ELEMS(sh->buffered_pts) - 1)
+    if (sh->num_buffered_pts == FF_ARRAY_ELEMS(sh->buffered_pts) - 1)
+        ctx->buffer_filled = 1;
+    if (!ctx->buffer_filled || !sh->num_buffered_pts)
         return NULL;
 
     mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE,


More information about the MPlayer-cvslog mailing list