[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    [PATCH] stability for mpeglib
From:       Martin Vogt <mvogt () rhrk ! uni-kl ! de>
Date:       2000-08-29 12:19:15
[Download RAW message or body]

Hi,


to track down the segfault I have made a few modifications,
which I like to include in CVS.

biggest change: mmx detection routine replaced (with the code from smpeg)
Im not happy about this, but it may be that my routine leave some
ebx,eax registers in a bad state. The smpeg source looks cleaner.
Note: it may be that this has caused a bug, Im not sure about this.

Then I added a few checks if the inputstream is already
closed. Same as the mmx patch: it may be that this caused some problems.

The bug is still there.
After ~1500 created/destruct cycles with full speed it still segfaults.
Im still not sure if its an artsd problem. Artsd uses 50MB after 1500
starts/stops, so there is a memory leak here.
Very likely we will not find the bug before KDE 2.0.

Martin





["a.diff" (text/plain)]

? a.txt
? a.diff
? example/yaf/yafyuv/yaf-yuv
? lib/mp3.patch
? lib/mp3-second.patch
? lib/mvogt@aixd1.rhrk.uni-kl.de
? lib/splay/mpeglayer3.cc.back
? lib/util/mmxflags_asm.S
Index: lib/Makefile.am
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/Makefile.am,v
retrieving revision 1.2
diff -r1.2 Makefile.am
9c9,11
< 			util/render/dither/dither32mmx.o
---
> 			util/render/dither/dither32mmx.o \
> 			util/mmxflags_asm.o
> 
Index: lib/decoder/decoderPlugin.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/decoder/decoderPlugin.cpp,v
retrieving revision 1.3
diff -r1.3 decoderPlugin.cpp
196a197
>   cout << "setUrl -s"<<endl;
197a199
>   cout << "setUrl -e"<<endl;
273a276
> 
Index: lib/input/fileInputStream.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/input/fileInputStream.cpp,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 fileInputStream.cpp
105c105
<     cerr << "read on not open file"<<endl;
---
>     cerr << "read on not open file want:"<<size<<endl;
Index: lib/output/artsOutputStream.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/output/artsOutputStream.cpp,v
retrieving revision 1.3
diff -r1.3 artsOutputStream.cpp
22c22,23
< 
---
>   
>   cout << "audioTime"<<endl;
23a25
>   cout << "x11Window"<<endl;
32a35
>   cout << "buffer"<<endl;
33a37
>   cout << "AVSyncer"<<endl;
Index: lib/output/outputStream.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/output/outputStream.cpp,v
retrieving revision 1.2
diff -r1.2 outputStream.cpp
26c26
< 
---
>   cout << "OutputStream behind mm_support"<<endl;
31a32
>   videoInit();
Index: lib/splay/mpegAudioStream.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/splay/mpegAudioStream.cpp,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 mpegAudioStream.cpp
60c60,64
<   header[1]=getbytedirect();
---
>   int val=getbytedirect();
>   if (val == -1) {
>     return false;
>   }
>   header[1]=val;
63c67,71
<     header[1]=getbytedirect();
---
>     val=getbytedirect();
>     if (val == -1) {
>       return false;
>     }
>     header[1]=val;
130,132c138,139
< 
<   dest[2]=getbytedirect();
<   if (input->eof()) {
---
>   int val=getbytedirect();
>   if (val==-1) {
135,136c142,144
<   dest[3]=getbytedirect();
<   if (input->eof()) {
---
>   dest[2]=val;
>   val=getbytedirect();
>   if (val==-1) {
138c146,147
<   }  
---
>   }
>   dest[3]=val;
Index: lib/splay/splayPlugin.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/splay/splayPlugin.cpp,v
retrieving revision 1.3
diff -r1.3 splayPlugin.cpp
19a20
>   pow(6.0,3.0);            // fixes bug in __math.h
Index: lib/util/Makefile.am
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/util/Makefile.am,v
retrieving revision 1.2
diff -r1.2 Makefile.am
4a5,6
> EXTRA_DIST		=	mmxflags_asm.S
> 
24a27,28
> libutil_la_LIBADD	=	mmxflags_asm.o
> 
25a30,31
> mmxflags_asm.o		:	mmxflags_asm.S
> 	 $(CXX) $(DEFS) -c -o $@ $< $(CXXFLAGS)
Index: lib/util/mmx.c
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/util/mmx.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 mmx.c
38a39
> extern unsigned int cpu_flags(void);
51,52d51
<   printf("hello mmx test\n");
<   if (mmSupport == -1) {
54,92c53,54
< 	__asm__ __volatile__ (
< 			      ".align 32\n"
< 			      "pushf \n"
< 			      "pop    %%eax\n"
< 			      "mov    %%eax,%%ecx\n"
< 			      "xor    $0x40000,%%eax\n"
< 			      "push   %%eax\n"
< 			      "popf   \n" 
< 			      "pushf  \n" 
< 			      "pop    %%eax\n"
< 			      "xor    %%ecx,%%eax\n"
< 			      "je     back\n"
< 			      "push   %%ecx\n"
< 			      "popf   \n"
< 			      "mov    %%ecx,%%eax\n"
< 			      "xor    $0x200000,%%eax\n"
< 			      "push   %%eax\n"
< 			      "popf   \n"
< 			      "pushf  \n"
< 			      "pop    %%eax\n"
< 			      "xor    %%ecx,%%eax\n"
< 			      "je     back\n"
< 			      "pusha  \n"
< 			      "mov    $0x1,%%eax\n"
< 			      "cpuid  \n"
< 			      "mov    %%edx,(%0)\n"
< 			      "popa   \n"
< 			      "mov    (%0),%%eax\n" 
< 			      "back:\n"
< 			      : 
< 			      : "r" (rval)
< 			      : "eax", "ebx", "ecx", "edx"
< 	);
< 
< 	if (val & MMX_CPU) {
< 	  mmSupport=1;
< 	} else {
< 	  mmSupport=0;
< 	}
---
>   if (mmSupport == -1) {
>     printf("hello mmx test\n");
94,95c56,63
< 	printf("val:%8x\n",val);
< 	
---
>     val=cpu_flags(); 
>     if (val & MMX_CPU) {
>       mmSupport=1;
>     } else {
>       mmSupport=0;
>     }
>     
>     printf("val:%8x\n",val);
Index: lib/util/render/x11/x11Surface.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib/lib/util/render/x11/x11Surface.cpp,v
retrieving revision 1.6
diff -r1.6 x11Surface.cpp
17c17
< const char *ERR_XI_STR[] = {
---
> static const char *ERR_XI_STR[] = {
54a55
>   XFlush(xWindow->display);
58a60
>   

_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic