summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd_dshow.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-03 21:32:31 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-03 21:32:31 +0000
commit57f4448e7a267d26496e52384f3e1c9c4fcb317d (patch)
tree62398aa35310c15ceb3971195a32140d256308a2 /libmpcodecs/vd_dshow.c
parentbaae4d1add5b184dcf0dc3271330ead267e048d7 (diff)
downloadmpv-57f4448e7a267d26496e52384f3e1c9c4fcb317d.tar.bz2
mpv-57f4448e7a267d26496e52384f3e1c9c4fcb317d.tar.xz
Partially revert r30645, the final output format is determined by
mpcodecs_config_vo so we need to query it afterwards. Still try to set a more sensible, codec-dependant preferred format even though it is currently ignored. Fixes bug #1659, based on patch by Andrew Wason [rectalogic rectalogic com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30824 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_dshow.c')
-rw-r--r--libmpcodecs/vd_dshow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmpcodecs/vd_dshow.c b/libmpcodecs/vd_dshow.c
index 8a1d29c321..82a0193b35 100644
--- a/libmpcodecs/vd_dshow.c
+++ b/libmpcodecs/vd_dshow.c
@@ -66,7 +66,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
// init driver
static int init(sh_video_t *sh){
- unsigned int out_fmt=sh->codec->outfmt[sh->outfmtidx];
+ unsigned int out_fmt=sh->codec->outfmt[0];
/* Hack for VSSH codec: new dll can't decode old files
* In my samples old files have no extradata, so use that info
@@ -81,6 +81,8 @@ static int init(sh_video_t *sh){
return 0;
}
if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,out_fmt)) return 0;
+ // mpcodecs_config_vo can change the format
+ out_fmt=sh->codec->outfmt[sh->outfmtidx];
switch(out_fmt){
case IMGFMT_YUY2:
case IMGFMT_UYVY: