Mercurial > mplayer.hg
changeset 5180:7e77d7344208
supports query_format in codecs
author | arpi |
---|---|
date | Mon, 18 Mar 2002 03:08:21 +0000 |
parents | 104cd0571dc4 |
children | 81ef0f0b285f |
files | libmpcodecs/dec_video.c libmpcodecs/vd.c |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c Mon Mar 18 01:55:38 2002 +0000 +++ b/libmpcodecs/dec_video.c Mon Mar 18 03:08:21 2002 +0000 @@ -41,7 +41,7 @@ int divx_quality=0; -static vd_functions_t* mpvdec=NULL; +vd_functions_t* mpvdec=NULL; int get_video_quality_max(sh_video_t *sh_video){ if(mpvdec){
--- a/libmpcodecs/vd.c Mon Mar 18 01:55:38 2002 +0000 +++ b/libmpcodecs/vd.c Mon Mar 18 03:08:21 2002 +0000 @@ -108,6 +108,8 @@ static mp_image_t* export_images[1]; static int static_idx=0; +extern vd_functions_t* mpvdec; // FIXME! + int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt){ int i,j; unsigned int out_fmt=0; @@ -127,9 +129,12 @@ if(out_fmt==(signed int)0xFFFFFFFF) continue; vo_flags=video_out->control(VOCTRL_QUERY_FORMAT, &out_fmt); mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X (i=%d) \n",vo_format_name(out_fmt),vo_flags,i); - // TODO: check (query) if codec really support this outfmt... - if(vo_flags&2){j=i; break;} - if(vo_flags && j<0) j=i; + if((vo_flags&2) || (vo_flags && j<0)){ + // check (query) if codec really support this outfmt... + if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)==CONTROL_FALSE) + continue; + j=i; if(vo_flags&2) break; + } } if(j<0){ // TODO: no match - we should use conversion...