summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 03:00:14 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 03:00:14 +0200
commit240550bbb94653907faa6e0bb1c5ac3d279cc252 (patch)
tree1cd5346e52515dbeff187d040d79b92fae96caa9 /libmpcodecs
parent9895f2360fd5e8c48f21117d6934254317891cde (diff)
parentfbb74e16a38d6a5af31a7fb369195988f7414766 (diff)
downloadmpv-240550bbb94653907faa6e0bb1c5ac3d279cc252.tar.bz2
mpv-240550bbb94653907faa6e0bb1c5ac3d279cc252.tar.xz
Merge svn changes up to r30848
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_dmo.c4
-rw-r--r--libmpcodecs/vd_dshow.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/libmpcodecs/vd_dmo.c b/libmpcodecs/vd_dmo.c
index 125357fc8e..c113e07d8a 100644
--- a/libmpcodecs/vd_dmo.c
+++ b/libmpcodecs/vd_dmo.c
@@ -55,7 +55,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];
struct context *ctx;
void *decoder;
if(!(decoder=DMO_VideoDecoder_Open(sh->codec->dll,&sh->codec->guid, sh->bih, 0, 0))){
@@ -64,6 +64,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];
sh->context = ctx = calloc(1, sizeof(*ctx));
ctx->decoder = decoder;
switch(out_fmt){
diff --git a/libmpcodecs/vd_dshow.c b/libmpcodecs/vd_dshow.c
index a960f5dffe..ad02cabb06 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: