Quoting Vittorio Giovara (2016-11-22 17:03:43)
> On Tue, Nov 22, 2016 at 8:36 AM, Anton Khirnov <[email protected]> wrote:
> > +
> > +int ff_alloc_packet(AVPacket *avpkt, int size)
> > +{
> > +    if (size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
> > +        return AVERROR(EINVAL);
> > +
> > +    if (avpkt->data) {
> > +        AVBufferRef *buf = avpkt->buf;
> > +
> > +        if (avpkt->size < size)
> > +            return AVERROR(EINVAL);
> > +
> > +        av_init_packet(avpkt);
> > +        avpkt->buf      = buf;
> > +        avpkt->size     = size;
> > +        return 0;
> > +    } else {
> > +        return av_new_packet(avpkt, size);
> > +    }
> > +}
> 
> could this maybe be moved to avpacket.c later on?

Nah, it should just be dropped eventually, since this feature is not
supported by the new encoding API anymore.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to