[MPlayer-cvslog] r35127 - trunk/libmpcodecs/vf_ass.c

reimar subversion at mplayerhq.hu
Wed Aug 29 18:06:26 CEST 2012


Author: reimar
Date: Wed Aug 29 18:06:26 2012
New Revision: 35127

Log:
vf_ass: Improve format query.

The output format should always match the input format
for this filter, and we should set the EOSD capability.
This also simplifies adding support for more formats.

Patch by Xidorn Quan [quanxunzhen gmail com].

Modified:
   trunk/libmpcodecs/vf_ass.c

Modified: trunk/libmpcodecs/vf_ass.c
==============================================================================
--- trunk/libmpcodecs/vf_ass.c	Tue Aug 28 22:47:34 2012	(r35126)
+++ trunk/libmpcodecs/vf_ass.c	Wed Aug 29 18:06:26 2012	(r35127)
@@ -75,6 +75,7 @@ static int config(struct vf_instance *vf
     if (outfmt == IMGFMT_IF09)
         return 0;
 
+    vf->priv->outfmt = outfmt;
     vf->priv->outh = height + ass_top_margin + ass_bottom_margin;
     vf->priv->outw = width;
 
@@ -366,7 +367,7 @@ static int query_format(struct vf_instan
     case IMGFMT_YV12:
     case IMGFMT_I420:
     case IMGFMT_IYUV:
-        return vf_next_query_format(vf, vf->priv->outfmt);
+        return vf_next_query_format(vf, fmt) | VFCAP_EOSD;
     }
     return 0;
 }
@@ -399,10 +400,10 @@ static const unsigned int fmt_list[] = {
 static int vf_open(vf_instance_t *vf, char *args)
 {
     int flags;
-    vf->priv->outfmt = vf_match_csp(&vf->next, fmt_list, IMGFMT_YV12);
-    if (vf->priv->outfmt)
-        flags = vf_next_query_format(vf, vf->priv->outfmt);
-    if (!vf->priv->outfmt || (vf->priv->auto_insert && flags & VFCAP_EOSD)) {
+    unsigned outfmt = vf_match_csp(&vf->next, fmt_list, IMGFMT_YV12);
+    if (outfmt)
+        flags = vf_next_query_format(vf, outfmt);
+    if (!outfmt || (vf->priv->auto_insert && flags & VFCAP_EOSD)) {
         uninit(vf);
         return 0;
     }


More information about the MPlayer-cvslog mailing list