[MPlayer-cvslog] CVS: main subreader.c,1.147,1.148

Rich Felker dalias at aerifal.cx
Sun Mar 19 16:42:31 CET 2006


On Sun, Mar 19, 2006 at 01:24:48PM +0200, Ivan Kalvachev wrote:
> 2006/3/18, Jindrich Makovicka <makovick at kmlinux.fjfi.cvut.cz>:
> > Alban Bedel wrote:
> > > On Sat, 18 Mar 2006 17:09:58 +0100
> > > Jindrich Makovicka <makovick at kmlinux.fjfi.cvut.cz> wrote:
> > >>> 3. decrease enca buffer
> > >> Sounds reasonable - I am going to change guess_cp to decrease the buffer
> > >> for unseekable streams instead.
> > >
> > > I'll second that 256KB seems quiet a lot anyway (many sub files are not
> > > that big). On the other hand we could still run in situations where a single
> > > stream buffer is not enouth anyway.
> >
> > As I don't completely understand the whole stream mess, here is the
> > intended fix. It works for me on unseekable http. Is it ok to commit?
> >
> 
> I'm not sure what will malloc(0)  won't return NULL pointer.
> I think it is better to just 'return;' from the funtion.

Huh? I don't see why this matters.
BTW please do not cast the return value of malloc. Doing so is
incorrect and horrible style (it masks bugs).

BTW2, 100l to whoever the idiot was who wrote malloc(foo*sizeof(char))
in the original code...

Rich




More information about the MPlayer-cvslog mailing list