From 7bb95cd8a5130a971d3d07eb79ba08fc91e4b7cb Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 28 Aug 2012 23:58:48 +0200 Subject: options, codecs.conf, img_format: unify imgfmt name handling Remove the duplication of image format name lists from codec-cfg.c and img_format.c. Remove the list of "long" image format names from img_format.c. One user visible change is that now mplayer won't print "long" format names anymore: e.g. instead of "Planar 420P 10-bit little-endian", the name "420p10le" is used. This is consistent with the names used by the option parser, and also less noisy. Partially based on mplayer2 commit f98e47574de15, with some differences. --- libmpcodecs/vf_dlopen.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libmpcodecs/vf_dlopen.c') diff --git a/libmpcodecs/vf_dlopen.c b/libmpcodecs/vf_dlopen.c index 1468a05998..dc55b50d52 100644 --- a/libmpcodecs/vf_dlopen.c +++ b/libmpcodecs/vf_dlopen.c @@ -112,7 +112,8 @@ static int config(struct vf_instance *vf, } if (vf->priv->filter.out_fmt) - vf->priv->outfmt = mp_imgfmt_from_name(vf->priv->filter.out_fmt); + vf->priv->outfmt = mp_imgfmt_from_name(bstr0(vf->priv->filter.out_fmt), + false); else { struct vf_dlopen_formatpair *p = vf->priv->filter.format_mapping; vf->priv->outfmt = 0; @@ -120,7 +121,7 @@ static int config(struct vf_instance *vf, for (; p->from; ++p) { // TODO support pixel format classes in matching if (!strcmp(p->from, vf->priv->filter.in_fmt)) { - vf->priv->outfmt = p->to ? mp_imgfmt_from_name(p->to) : fmt; + vf->priv->outfmt = mp_imgfmt_from_name(bstr0(p->to), false); break; } } @@ -261,7 +262,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt) for (; p->from; ++p) { // TODO support pixel format classes in matching if (!strcmp(p->from, fmtname)) { - outfmt = p->to ? mp_imgfmt_from_name(p->to) : fmt; + outfmt = mp_imgfmt_from_name(bstr0(p->to), false); break; } } -- cgit v1.2.3