[FFmpeg-devel] [PATCH] Musepack SV8 demuxer and decoder
Michael Niedermayer
michaelni
Sun Nov 4 12:35:37 CET 2007
Hi
On Sun, Nov 04, 2007 at 02:12:04PM +0200, Kostya wrote:
> On Sun, Nov 04, 2007 at 12:58:22AM +0100, Michael Niedermayer wrote:
[...]
> > [...]
> > > + if(keyframe){
> > > + c->buf_size = buf_size;
> > > + c->bits = av_realloc(c->bits, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
> > > + memcpy(c->bits, buf, buf_size);
> > > + init_get_bits(gb, c->bits, buf_size * 8);
> > > + memset(c->Q, 0, sizeof(c->Q));
> > > + c->last_bits_used = 0;
> > > + }
> >
> > please remove this realloc() and memcpy() mess and decode the individual
> > frames which your decoder receives from the parser
>
> I fear it would be overkill as parser needs to effectively duplicate decode_frame().
> MPC SV8 stores several frames in one packet, first of them is keyframe, they should
> be parsed as single bitstream with no byte paddings. Also there is no way to determine
> frame length without decoding it and using correct information from previous frame
> to decode current frame.
still theres no sense or need for realloc() and memcpy()
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071104/1e1a9ded/attachment.pgp>
More information about the ffmpeg-devel
mailing list