[Ffmpeg-devel] [PATCH] THP PCM decoder (GSoC Qualification)

Marco Gerards mgerards
Thu Apr 5 21:31:34 CEST 2007


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"?

--
Marco





More information about the ffmpeg-devel mailing list