[MPlayer-dev-eng] [PATCH] vf_ass: remove READABLE flag

Xidorn Quan quanxunzhen at gmail.com
Wed Sep 5 03:45:16 CEST 2012


Hi,

I read the comment for MP_IMGFLAG_READABLE, and didn't think that
vf_ass need a buffer to be readable across frames. It always requests
a new buffer in get_image or put_image. Additionally, IMGTYPE_TEMP
also indicates that buffer can be write-only.

Since this patch is small, I pasted it here directly.

Regards,
Xidorn Quan

Index: libmpcodecs/vf_ass.c
===================================================================
--- libmpcodecs/vf_ass.c    (revision 35147)
+++ libmpcodecs/vf_ass.c    (working copy)
@@ -140,7 +140,7 @@

     // width never changes, always try full DR
     mpi->priv = vf->dmpi = vf_get_image(vf->next, mpi->imgfmt, mpi->type,
-                                        mpi->flags | MP_IMGFLAG_READABLE,
+                                        mpi->flags,
                                         FFMAX(mpi->width,  vf->priv->outw),
                                         FFMAX(mpi->height, vf->priv->outh));

@@ -233,7 +233,7 @@
     }
     // hope we'll get DR buffer:
     vf->dmpi = vf_get_image(vf->next, vf->priv->outfmt, MP_IMGTYPE_TEMP,
-                            MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_READABLE,
+                            MP_IMGFLAG_ACCEPT_STRIDE,
                             vf->priv->outw, vf->priv->outh);

     // copy mpi->dmpi...


More information about the MPlayer-dev-eng mailing list