[MPlayer-cvslog] r36538 - trunk/libmpcodecs/vd.c
reimar
subversion at mplayerhq.hu
Sun Dec 8 18:52:23 CET 2013
Author: reimar
Date: Sun Dec 8 18:52:23 2013
New Revision: 36538
Log:
Query codec support first.
The filter chain query is more complex.
In addition this for the moment avoids a vo_vdpau bug
where the query function destroys the old decoder.
Modified:
trunk/libmpcodecs/vd.c
Modified: trunk/libmpcodecs/vd.c
==============================================================================
--- trunk/libmpcodecs/vd.c Sun Dec 8 16:07:00 2013 (r36537)
+++ trunk/libmpcodecs/vd.c Sun Dec 8 18:52:23 2013 (r36538)
@@ -194,21 +194,21 @@ int mpcodecs_config_vo(sh_video_t *sh, i
out_fmt = sh->codec->outfmt[i];
if (out_fmt == (unsigned int) 0xFFFFFFFF)
continue;
+ // check (query) if codec really support this outfmt...
+ sh->outfmtidx = j; // pass index to the control() function this way
+ if (mpvdec->control(sh, VDCTRL_QUERY_FORMAT, &out_fmt) ==
+ CONTROL_FALSE) {
+ mp_msg(MSGT_CPLAYER, MSGL_DBG2,
+ "vo_debug: codec query_format(%s) returned FALSE\n",
+ vo_format_name(out_fmt));
+ continue;
+ }
flags = vf->query_format(vf, out_fmt);
mp_msg(MSGT_CPLAYER, MSGL_DBG2,
"vo_debug: query(%s) returned 0x%X (i=%d) \n",
vo_format_name(out_fmt), flags, i);
if ((flags & VFCAP_CSP_SUPPORTED_BY_HW)
|| (flags & VFCAP_CSP_SUPPORTED && j < 0)) {
- // check (query) if codec really support this outfmt...
- sh->outfmtidx = j; // pass index to the control() function this way
- if (mpvdec->control(sh, VDCTRL_QUERY_FORMAT, &out_fmt) ==
- CONTROL_FALSE) {
- mp_msg(MSGT_CPLAYER, MSGL_DBG2,
- "vo_debug: codec query_format(%s) returned FALSE\n",
- vo_format_name(out_fmt));
- continue;
- }
j = i;
vo_flags = flags;
if (flags & VFCAP_CSP_SUPPORTED_BY_HW)
@@ -217,10 +217,7 @@ int mpcodecs_config_vo(sh_video_t *sh, i
&& !(flags &
(VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_CSP_SUPPORTED))
&& (out_fmt == IMGFMT_RGB8 || out_fmt == IMGFMT_BGR8)) {
- sh->outfmtidx = j; // pass index to the control() function this way
- if (mpvdec->control(sh, VDCTRL_QUERY_FORMAT, &out_fmt) !=
- CONTROL_FALSE)
- palette = 1;
+ palette = 1;
}
}
if (j < 0 && !IMGFMT_IS_HWACCEL(preferred_outfmt)) {
More information about the MPlayer-cvslog
mailing list