[Ffmpeg-devel] [PATCH] THP PCM decoder (GSoC Qualification)
Michael Niedermayer
michaelni
Thu Apr 5 22:01:06 CEST 2007
Hi
On Thu, Apr 05, 2007 at 09:31:34PM +0200, Marco Gerards wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
>
> > Hi
> >
> > On Thu, Apr 05, 2007 at 07:55:06PM +0200, Marco Gerards wrote:
> >> Michael Niedermayer <michaelni at gmx.at> writes:
> > [...]
> >> > [...]
> >> >> + else {
> >> >> + ret = av_get_packet(pb, pkt, thp->audiosize);
> >> >> + if (ret != thp->audiosize) {
> >> >> + av_free_packet(pkt);
> >> >> + return AVERROR_IO;
> >> >> + }
> >> >>
> >> >> + pkt->stream_index = thp->audio_stream_index;
> >> >> + thp->audiosize = 0;
> >> >> + thp->frame++;
> >> >> + }
> >> >
> >> > indention is not 4 spaces and it seems the existing code in thp.c is also
> >> > not consistently indented, somehow i must have missed that ...
> >> > this should be fixed
> >> > and of course the existing code reindention should be seperate from functional
> >> > changes
> >>
> >> I will send in a patch for the indentation of the other code, after
> >> this one is applied. I have fixed the indentation in this new patch.
> >
> > [...]
> >
> >> + if (samples + samplecnt >= samples_end) {
> >> + av_log(avctx, AV_LOG_ERROR, "allocated output buffer is too small\n");
> >> + return -1;
> >> + }
> >
> > this is twofold buggy
>
> Ehm right... Do you mean it should be "samples + samplecnt * st > samples_end"?
you are on the right track toward fixing one of 2 bugs in this line of code
but you rather just introduced a third one
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070405/9651b98f/attachment.pgp>
More information about the ffmpeg-devel
mailing list