[FFmpeg-devel] [PATCH 1/2] libavcodec/pgxdec: Add PGX decoder

Gautam Ramakrishnan gautamramk at gmail.com
Mon Jun 29 17:06:13 EEST 2020


On Mon, Jun 29, 2020 at 6:28 PM Nicolas George <george at nsup.org> wrote:
>
> Gautam Ramakrishnan (12020-06-27):
> > I used 9 digits because I was using a fixed size string to store the number
> > and then used strol. Now as I removed the usage of strol, it wasnt necessary.
> > Do you thing using a loop of fixed iterations is a good idea?  Is it better if
> > I use the for loop again?
>
> You need to write it as the format demands. If there is an official
> limit on the size of the numbers, then use that. Otherwise, if it is
> possible to write the width as 00000000000000000000000000000640, then
> your parser should accept that, and find another way to avoid the
> overflow. Checking for INT_MAX/10 before multiplying seems like an easy
> and obvious solution.
>
I did not think of this. I shall account for this.





-- 
-------------
Gautam |


More information about the ffmpeg-devel mailing list