[Mplayer-cvslog] CVS: main/libmpcodecs vd_cinepak.c,1.6,1.7 vd_cyuv.c,1.1,1.2 vd_divx4.c,1.5,1.6 vd_dshow.c,1.3,1.4 vd_ffmpeg.c,1.2,1.3 vd_fli.c,1.1,1.2 vd_ijpg.c,1.4,1.5 vd_libmpeg2.c,1.3,1.4 vd_mpng.c,1.1,1.2 vd_msvidc.c,1.1,1.2 vd_nuv.c,1.1,1.2 vd_odivx.c,1.6,1.7 vd_qtrle.c,1.1,1.2 vd_qtrpza.c,1.4,1.5 vd_qtsmc.c,1.1,1.2 vd_raw.c,1.2,1.3 vd_rle.c,1.2,1.3 vd_roqvideo.c,1.1,1.2 vd_vfw.c,1.2,1.3 vd_xanim.c,1.2,1.3

Arpi of Ize arpi at mplayer.dev.hu
Sat Mar 16 02:10:34 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv5955

Modified Files:
	vd_cinepak.c vd_cyuv.c vd_divx4.c vd_dshow.c vd_ffmpeg.c 
	vd_fli.c vd_ijpg.c vd_libmpeg2.c vd_mpng.c vd_msvidc.c 
	vd_nuv.c vd_odivx.c vd_qtrle.c vd_qtrpza.c vd_qtsmc.c vd_raw.c 
	vd_rle.c vd_roqvideo.c vd_vfw.c vd_xanim.c 
Log Message:
handle error from mpcodecs_config_vo()

Index: vd_cinepak.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_cinepak.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vd_cinepak.c	7 Mar 2002 20:43:17 -0000	1.6
+++ vd_cinepak.c	16 Mar 2002 01:10:31 -0000	1.7
@@ -22,14 +22,12 @@
     return CONTROL_UNKNOWN;
 }
 
-//int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt);
 void *decode_cinepak_init(void);
 
 // init driver
 static int init(sh_video_t *sh){
     sh->context = decode_cinepak_init();
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2);
 }
 
 // uninit driver

Index: vd_cyuv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_cyuv.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_cyuv.c	8 Mar 2002 07:14:34 -0000	1.1
+++ vd_cyuv.c	16 Mar 2002 01:10:31 -0000	1.2
@@ -24,8 +24,7 @@
 
 // init driver
 static int init(sh_video_t *sh){
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_UYVY);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_UYVY);
 }
 
 // uninit driver

Index: vd_divx4.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_divx4.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vd_divx4.c	11 Mar 2002 00:39:40 -0000	1.5
+++ vd_divx4.c	16 Mar 2002 01:10:31 -0000	1.6
@@ -74,9 +74,10 @@
     DEC_PARAM dec_param;
     DEC_SET dec_set;
     int bits=16;
-    memset(&dec_param,0,sizeof(dec_param));
 
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2);
+    if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2)) return 0;
+
+    memset(&dec_param,0,sizeof(dec_param));
 
     switch(sh->codec->outfmt[sh->outfmtidx]){
 	case IMGFMT_YV12: dec_param.output_format=DEC_YV12;bits=12;break;

Index: vd_dshow.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_dshow.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vd_dshow.c	9 Mar 2002 19:18:46 -0000	1.3
+++ vd_dshow.c	16 Mar 2002 01:10:31 -0000	1.4
@@ -57,7 +57,7 @@
         mp_msg(MSGT_DECVIDEO,MSGL_HINT,"package from:  ftp://mplayerhq.hu/MPlayer/releases/w32codec.zip  !\n");
 	return 0;
     }
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2);
+    if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2)) return 0;
     out_fmt=sh->codec->outfmt[sh->outfmtidx];
     switch(out_fmt){
     case IMGFMT_YUY2:

Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vd_ffmpeg.c	7 Mar 2002 20:43:17 -0000	1.2
+++ vd_ffmpeg.c	16 Mar 2002 01:10:31 -0000	1.3
@@ -71,8 +71,7 @@
         return 0;
     }
     mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: libavcodec init OK!\n");
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
 }
 
 // uninit driver

Index: vd_fli.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_fli.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_fli.c	7 Mar 2002 21:06:59 -0000	1.1
+++ vd_fli.c	16 Mar 2002 01:10:31 -0000	1.2
@@ -35,7 +35,7 @@
 
 // init driver
 static int init(sh_video_t *sh){
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
+    if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24)) return 0;
     sh->context = init_fli_decoder(sh->disp_w, sh->disp_h);
     return 1;
 }

Index: vd_ijpg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ijpg.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vd_ijpg.c	11 Mar 2002 20:13:45 -0000	1.4
+++ vd_ijpg.c	16 Mar 2002 01:10:31 -0000	1.5
@@ -159,7 +159,7 @@
   {
    last_w=width; last_h=height; last_c=out_fmt;
    if ( !out_fmt ) return NULL;
-   mpcodecs_config_vo( sh,width,height,out_fmt );
+   if(!mpcodecs_config_vo( sh,width,height,out_fmt )) return NULL;
   }
 
  mpi=mpcodecs_get_image( sh,MP_IMGTYPE_TEMP,MP_IMGFLAG_ACCEPT_STRIDE,width,height );

Index: vd_libmpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_libmpeg2.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vd_libmpeg2.c	14 Mar 2002 23:08:47 -0000	1.3
+++ vd_libmpeg2.c	16 Mar 2002 01:10:31 -0000	1.4
@@ -38,8 +38,7 @@
     // send seq header to the decoder:  *** HACK ***
     mpeg2_decode_data(NULL,videobuffer,videobuffer+videobuf_len,0);
     mpeg2_allocate_image_buffers (picture);
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
 }
 
 // uninit driver

Index: vd_mpng.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_mpng.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_mpng.c	9 Mar 2002 02:18:33 -0000	1.1
+++ vd_mpng.c	16 Mar 2002 01:10:31 -0000	1.2
@@ -108,7 +108,7 @@
  if(last_w!=png_width || last_h!=png_height || last_c!=out_fmt){
     last_w=png_width; last_h=png_height; last_c=out_fmt;
     if(!out_fmt) return NULL;
-    mpcodecs_config_vo(sh,png_width,png_height,out_fmt);
+    if(!mpcodecs_config_vo(sh,png_width,png_height,out_fmt)) return NULL;
  }
 
 #if 0

Index: vd_msvidc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_msvidc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_msvidc.c	7 Mar 2002 21:06:59 -0000	1.1
+++ vd_msvidc.c	16 Mar 2002 01:10:31 -0000	1.2
@@ -24,8 +24,7 @@
 
 // init driver
 static int init(sh_video_t *sh){
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
 }
 
 // uninit driver

Index: vd_nuv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_nuv.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_nuv.c	8 Mar 2002 07:14:34 -0000	1.1
+++ vd_nuv.c	16 Mar 2002 01:10:31 -0000	1.2
@@ -24,8 +24,7 @@
 
 // init driver
 static int init(sh_video_t *sh){
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_I420);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_I420);
 }
 
 // uninit driver

Index: vd_odivx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_odivx.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vd_odivx.c	11 Mar 2002 00:39:40 -0000	1.6
+++ vd_odivx.c	16 Mar 2002 01:10:31 -0000	1.7
@@ -118,8 +118,7 @@
     
     mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: OpenDivX video codec init OK!\n");
 
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
 }
 
 // uninit driver

Index: vd_qtrle.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_qtrle.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_qtrle.c	8 Mar 2002 07:14:34 -0000	1.1
+++ vd_qtrle.c	16 Mar 2002 01:10:31 -0000	1.2
@@ -33,8 +33,7 @@
     return 0;
   }
     
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
 }
 
 // uninit driver

Index: vd_qtrpza.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_qtrpza.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vd_qtrpza.c	7 Mar 2002 20:43:17 -0000	1.4
+++ vd_qtrpza.c	16 Mar 2002 01:10:31 -0000	1.5
@@ -22,12 +22,9 @@
     return CONTROL_UNKNOWN;
 }
 
-//int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt);
-
 // init driver
 static int init(sh_video_t *sh){
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR16);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR16);
 }
 
 // uninit driver

Index: vd_qtsmc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_qtsmc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_qtsmc.c	8 Mar 2002 07:14:34 -0000	1.1
+++ vd_qtsmc.c	16 Mar 2002 01:10:31 -0000	1.2
@@ -31,8 +31,7 @@
 	return 0;
     }
     
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
 }
 
 // uninit driver

Index: vd_raw.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_raw.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vd_raw.c	7 Mar 2002 20:43:17 -0000	1.2
+++ vd_raw.c	16 Mar 2002 01:10:31 -0000	1.3
@@ -40,8 +40,7 @@
 	    mp_msg(MSGT_DECVIDEO,MSGL_WARN,"RAW: depth %d not supported\n",sh->bih->biBitCount);
 	}
     }
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,sh->format);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,sh->format);
 }
 
 // uninit driver

Index: vd_rle.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_rle.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vd_rle.c	7 Mar 2002 20:43:17 -0000	1.2
+++ vd_rle.c	16 Mar 2002 01:10:31 -0000	1.3
@@ -24,7 +24,7 @@
 
 // init driver
 static int init(sh_video_t *sh){
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
+    if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24)) return 0;
     if( (((sh->codec->outfmt[sh->outfmtidx]&255)+7)/8)==2 ){
      unsigned int* pal=(unsigned int*)(((char*)sh->bih)+40);
      int cols=(sh->bih->biSize-40)/4;

Index: vd_roqvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_roqvideo.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_roqvideo.c	8 Mar 2002 07:14:34 -0000	1.1
+++ vd_roqvideo.c	16 Mar 2002 01:10:31 -0000	1.2
@@ -27,8 +27,7 @@
 // init driver
 static int init(sh_video_t *sh){
     sh->context = roq_decode_video_init();
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
 }
 
 // uninit driver

Index: vd_vfw.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_vfw.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vd_vfw.c	7 Mar 2002 20:43:17 -0000	1.2
+++ vd_vfw.c	16 Mar 2002 01:10:31 -0000	1.3
@@ -54,9 +54,7 @@
     unsigned int out_fmt;
     if(!init_vfw_video_codec(sh,(sh->codec->driver==VFM_VFWEX))) return 0;
     mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n");
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2);
-//    out_fmt=sh->codec->outfmt[sh->outfmtidx];
-    return 1;
+    return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2);
 }
 
 // uninit driver

Index: vd_xanim.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_xanim.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vd_xanim.c	7 Mar 2002 20:43:17 -0000	1.2
+++ vd_xanim.c	16 Mar 2002 01:10:31 -0000	1.3
@@ -28,7 +28,7 @@
 
 // init driver
 static int init(sh_video_t *sh){
-    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,sh->format);
+    if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,sh->format)) return 0;
     return xacodec_init_video(sh,sh->codec->outfmt[sh->outfmtidx]);
 }
 




More information about the MPlayer-cvslog mailing list