[MPlayer-users] Re: playlist memory leak problem

Raheel Hameed raheel.hameed at gmail.com
Wed Sep 7 13:11:43 CEST 2005


Hi again,

I just found a way around to this memory leak issue ... my solution
although is not a decent one, but it works good for me as I don't need
to get back to console at all.

- i needed to run MPlayer a playlist in a loop forever
- i needed to use -fixed-vo option so that I don't see video mode
reinitialization jerk
- -fixed-vo with playlist loop appears to leak all memory quickly
within a few minutes ( < 5 minutes ).
- if I don't use -fixed-vo i see an unexceptable jerk in b/w every
media change in the playlist.
- i stopped using -fixed-vo option and made these changes in the
source code to avoid jerk b/w consecutive media files:

1) in libvo/vo_vesa.c, i commented these two lines in vesa_term() function:
 if(init_state) if((err=vbeRestoreState(init_state)) != VBE_OK)
PRINT_VBE_ERR("vbeRestoreState",err);
 if(init_mode) if((err=vbeSetMode(init_mode,NULL)) != VBE_OK)
PRINT_VBE_ERR("vbeSetMode",err);

2) in libvo/vo_vesa.c, i edited this code in config():

                if((err=vbeSaveState(&init_state)) != VBE_OK)
                {
                        PRINT_VBE_ERR("vbeSaveState",err);
                        return -1;
                }

   and changed it to:

static int first_time=1;
if (first_time)
{
                if((err=vbeSaveState(&init_state)) != VBE_OK)
                {
                        PRINT_VBE_ERR("vbeSaveState",err);
                        return -1;
                }
 first_time=0;
}

and it now works like a charm :)

best wishes,

Raheel Hameed

On 9/6/05, Raheel Hameed <raheel.hameed at gmail.com> wrote:
> Further to my mail below, i have just investigated that it's the
> option "fixed-vo" that when used with playlist, eats up all the memory
> quickly. If I remove "fixed-vo" option from the command line mentioned
> in my email below, the huge memory leak go away.
> 
> On 9/6/05, Raheel Hameed <raheel.hameed at gmail.com> wrote:
> > hi,
> >
> > there's memory leak problem when we use playlist option, it looks like
> > its leaking memory after every playlist iteration, and it can hardly
> > run for  5 minutes and exhausts all the memory and so kernel kills it.
> > I experienced this problem with MPlayer-0.93 & tried the latest
> > version MPlayer-1.0pre7try2 and the same problem exists there as well.
> > Here's the way I run the mplayer:
> >
> > ./mplayer -playlist playlist.txt -loop 0 -slave -fs -vo vesa -fixed-vo
> >  -really-quiet 2> /dev/null > /dev/null
> >
> > whereas playlist.txt contains logo.mpg on first line and ppt.avi on
> > other line. It seems it doesn't matter what you play, this happens
> > always as long as you run it like above.
> >
> > i'm running :
> >
> > - Slackware 9.1
> > - Linux 2.4.22 i686
> > - libc-2.3.2.so
> > - gcc 3.2.3
> > - ld 2.14.90.0.6 20030820
> > - as 2.14.90.0.6 20030820
> > - /proc/cpuinfo :
> > processor       : 0
> > vendor_id       : CentaurHauls
> > cpu family      : 6
> > model           : 7
> > model name      : VIA Samuel 2
> > stepping        : 3
> > cpu MHz         : 800.047
> > cache size      : 64 KB
> > fdiv_bug        : no
> > hlt_bug         : no
> > f00f_bug        : no
> > coma_bug        : no
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 1
> > wp              : yes
> > flags           : fpu de tsc msr cx8 mtrr pge mmx 3dnow
> > bogomips        : 1595.80
> >
> > If there's anything else needed please let me know.
> >
> > Regards,
> >
> > Raheel Hameed.
> >
>




More information about the MPlayer-users mailing list