diff libmpcodecs/vd_ijpg.c @ 5365:b87743434e1f

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.
author atmos4
date Wed, 27 Mar 2002 02:58:55 +0000
parents 3dcbf67c0de0
children f46873b05f82
line wrap: on
line diff
--- a/libmpcodecs/vd_ijpg.c	Wed Mar 27 02:08:14 2002 +0000
+++ b/libmpcodecs/vd_ijpg.c	Wed Mar 27 02:58:55 2002 +0000
@@ -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;