aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/dec_video.c2
-rw-r--r--libmpcodecs/vd.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index db374211d6..93aac4d9c2 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -41,7 +41,7 @@ extern vo_vaa_t vo_vaa;
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){
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index a7a87bf6cf..6c7717c9e1 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -108,6 +108,8 @@ static mp_image_t* temp_images[1];
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 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outf
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...