[MPlayer-dev-eng] [PATCH] bugfix vo_png vo_gif89a

pl p_l at gmx.fr
Mon May 13 22:16:09 CEST 2002


On Mon, May 13, 2002 at 08:23:38AM -0500, Joey Parrish wrote:

> > Attached are two patches, one for vo_png, one for vo_gif89a.
> 
> > Problems I've found but not patched yet:
> >   - vop scale with gif89a causes crashes
> 
> Okay, now I've patched it.
> I just removed the software scaler code as Atmos suggested before.
> 
> Ignore my previous gif_fix patch, a revised patch for the gif
> problems is attached.  The previous patch for the png bugs is still
> valid, though.

Please test the attached patch based on your patch for configure (and
feel free to edit).

It's against latest cvs and should fix some display issues when tests
fail and a possible issue if the user uses optimizations (int i=0; if (i
== 1) blah(); ...} might be not compiled when optimizations are enabled).

-- 
Best regards,
  pl
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.469
diff -u -r1.469 configure
--- configure	13 May 2002 13:15:30 -0000	1.469
+++ configure	13 May 2002 20:16:21 -0000
@@ -2339,30 +2339,45 @@
 cat > $TMPC << EOF
 #include <gif_lib.h>
 int main(void) {
-  EGifPutExtensionFirst(NULL, 0xFF, 11, NULL);
   return 0;
 }
 EOF
-  if cc_check -lungif ; then
+  if cc_check -lungif && "$TMPO" >> "$TMPLOG" ; then
     _gif=yes
     _ld_gif="-lungif"
-  elif cc_check -lgif ; then
+  elif cc_check -lgif && "$TMPO" >> "$TMPLOG" ; then
     _gif=yes
     _ld_gif="-lgif"
   fi
 fi
-echores "$_gif"
 
 if test "$_gif" = yes ; then
   _def_gif='#define HAVE_GIF 1'
   _vosrc="$_vosrc vo_gif89a.c"
   _vomodules="gif89a $_vomodules"
   _mkf_gif="yes"
+  _gif="yes (old version, some functions disabled)"
+  _def_gif_4='#undef HAVE_GIF_4'
+
+  cat > $TMPC << EOF
+#include <gif_lib.h>
+int main(void) {
+  printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
+  EGifSetGifVersion("89a");   // this will segfault a buggy gif lib.
+  return 0;
+}
+EOF
+  if cc_check "$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
+    _def_gif_4='#define HAVE_GIF_4 1'
+    _gif="yes"
+  fi
 else
   _def_gif='#undef HAVE_GIF'
+  _def_gif_4='#undef HAVE_GIF_4'
   _novomodules="gif89a $_novomodules"
   _mkf_gif="no"
 fi
+echores "$_gif"
 
 
 if test "$_vesa" != no ; then
@@ -4047,6 +4062,7 @@
 
 /* enable GIF support */
 $_def_gif
+$_def_gif_4
 
 /* libmad support */
 $_def_mad


More information about the MPlayer-dev-eng mailing list