[Mplayer-cvslog] CVS: main/libmpcodecs vd.c,1.27,1.28 vd_ijpg.c,1.5,1.6
Atmosfear
atmos4 at mplayer.dev.hu
Wed Mar 27 03:58:58 CET 2002
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv18591/libmpcodecs
Modified Files:
vd.c vd_ijpg.c
Log Message:
Issue a warning in VDec if disp_w and disp_h weren't set by codec and try workaround.
Fix ijpg codec to set sh->disp_w and sh->disp_h.
Index: vd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- vd.c 24 Mar 2002 19:01:01 -0000 1.27
+++ vd.c 27 Mar 2002 02:58:55 -0000 1.28
@@ -123,6 +123,18 @@
int screen_size_y=0;//SCREEN_SIZE_Y;
vo_functions_t* video_out=sh->video_out;
+#if 1
+ if(!(sh->disp_w && sh->disp_h))
+ mp_msg(MSGT_DECVIDEO,MSGL_WARN,
+ "VDec: codec didn't set sh->disp_w and sh->disp_h, trying to workaround!\n");
+ /* XXX: HACK, if sh->disp_* aren't set,
+ * but we have w and h, set them :: atmos */
+ if(!sh->disp_w && w)
+ sh->disp_w=w;
+ if(!sh->disp_h && h)
+ sh->disp_h=h;
+#endif
+
mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDec: vo config request - %d x %d, %s \n",
w,h,vo_format_name(preferred_outfmt));
Index: vd_ijpg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ijpg.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vd_ijpg.c 16 Mar 2002 01:10:31 -0000 1.5
+++ vd_ijpg.c 27 Mar 2002 02:58:55 -0000 1.6
@@ -133,8 +133,6 @@
if ( len <= 0 ) return NULL; // skipped frame
- cinfo.err=jpeg_std_error( &jerr.pub );
- jerr.pub.error_exit=my_error_exit;
if( setjmp( jerr.setjmp_buffer ) )
{
mp_msg( MSGT_DECVIDEO,MSGL_ERR,"[ijpg] setjmp error ...\n" );
@@ -144,8 +142,8 @@
jpeg_create_decompress( &cinfo );
jpeg_buf_src( &cinfo,data,len );
jpeg_read_header( &cinfo,TRUE );
- width=cinfo.image_width;
- height=cinfo.image_height;
+ sh->disp_w=width=cinfo.image_width;
+ sh->disp_h=height=cinfo.image_height;
jpeg_start_decompress( &cinfo );
depth=cinfo.output_components * 8;
More information about the MPlayer-cvslog
mailing list