[Mplayer-cvslog] CVS: main/libmpcodecs ad_a52.c,NONE,1.1

Mike Melanson melanson at pcisys.net
Mon Mar 25 22:42:19 CET 2002


On Mon, 25 Mar 2002, Arpi wrote:

> btw while you're watching it, you should actually get your cyber-pen and
> fix your codecs... they are very broken, at least the videpoint of design.
> you use such hacks:
> 
>   static unsigned char *ibuf = NULL;
>   if (!ibuf)
>     ibuf = (unsigned char *)malloc(sh_audio->wf->nBlockAlign);

	Now how did this come about? I remember: I modeled my IMA4 decoder
after the existing one which was able to assume a static buffer. When I
moved on to audio codecs contained in AVI files, I used the same model,
which clearly didn't fit but I used it anyway.

> instead of:
> - using sh_audio->a_in_buffer as pointer
> - doing allocation at init() stage

	Okay, this looks cleaner. I recently discovered that in
AVI/ASF/WAV files contain IMA4 data, they get their size from that same
nBlockAlign field, too. I should take that into account, but do you know
of any such samples?

	Thanks...
--
	-Mike Melanson




More information about the MPlayer-cvslog mailing list