[MPlayer-cvslog] r30647 - in trunk/libmpcodecs: vd_dmo.c vd_dshow.c

reimar subversion at mplayerhq.hu
Thu Feb 18 23:37:08 CET 2010


Author: reimar
Date: Thu Feb 18 23:37:08 2010
New Revision: 30647

Log:
Merge declaration and initialization.

Modified:
   trunk/libmpcodecs/vd_dmo.c
   trunk/libmpcodecs/vd_dshow.c

Modified: trunk/libmpcodecs/vd_dmo.c
==============================================================================
--- trunk/libmpcodecs/vd_dmo.c	Thu Feb 18 23:34:27 2010	(r30646)
+++ trunk/libmpcodecs/vd_dmo.c	Thu Feb 18 23:37:08 2010	(r30647)
@@ -46,13 +46,12 @@ static int control(sh_video_t *sh,int cm
 
 // init driver
 static int init(sh_video_t *sh){
-    unsigned int out_fmt;
+    unsigned int out_fmt=sh->codec->outfmt[sh->outfmtidx];
     if(!(sh->context=DMO_VideoDecoder_Open(sh->codec->dll,&sh->codec->guid, sh->bih, 0, 0))){
         mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll);
         mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_DownloadCodecPackage);
 	return 0;
     }
-    out_fmt=sh->codec->outfmt[sh->outfmtidx];
     if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,out_fmt)) return 0;
     switch(out_fmt){
     case IMGFMT_YUY2:

Modified: trunk/libmpcodecs/vd_dshow.c
==============================================================================
--- trunk/libmpcodecs/vd_dshow.c	Thu Feb 18 23:34:27 2010	(r30646)
+++ trunk/libmpcodecs/vd_dshow.c	Thu Feb 18 23:37:08 2010	(r30647)
@@ -66,7 +66,7 @@ static int control(sh_video_t *sh,int cm
 
 // init driver
 static int init(sh_video_t *sh){
-    unsigned int out_fmt;
+    unsigned int out_fmt=sh->codec->outfmt[sh->outfmtidx];
 
     /* Hack for VSSH codec: new dll can't decode old files
      * In my samples old files have no extradata, so use that info
@@ -80,7 +80,6 @@ static int init(sh_video_t *sh){
         mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_DownloadCodecPackage);
 	return 0;
     }
-    out_fmt=sh->codec->outfmt[sh->outfmtidx];
     if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,out_fmt)) return 0;
     switch(out_fmt){
     case IMGFMT_YUY2:


More information about the MPlayer-cvslog mailing list