On Tue, Mar 20, 2012 at 10:35 AM, Paul B Mahol <[email protected]> wrote:
>
> On 3/20/12, Uoti Urpala <[email protected]> wrote:
> > On Mon, 2012-03-19 at 20:55 -0700, Ronald S. Bultje wrote:
> >> Shouldn't avpkt->size be unsigned also?
> >
> > Unsigned types cause problems for normal code. Making the type unsigned
> > would break tests like
> > "if (size_left - avpkt->size < min_left)"
>
> I do not consider that normal code.

Why not?

Even if it seems strange to you it is well defined behavior and I
don't think we should go changing it lightly.

Furthermore av_malloc(size) fails when size > INT_MAX so we can't even
allocate data for these new jumbo packets.

>
> > If you want to support packets larger than 2 GiB, then a 64-bit signed
> > type would be a better idea.
> >
> > BTW the casts in the original patch are redundant; the function return
> > value is automatically cast to the return type of the function. Unless
> > the intent is to emphasize that sizes larger than 4 GiB won't work.
> _______________________________________________
> libav-devel mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-devel
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to