[FFmpeg-cvslog] avfilter: port pullup filter from libmpcodecs
Michael Niedermayer
michaelni at gmx.at
Sun Oct 20 14:27:43 CEST 2013
On Tue, Sep 17, 2013 at 07:03:56PM +0200, Paul B Mahol wrote:
> ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Jul 8 12:42:53 2013 +0000| [9c774459a95833014163ebfdf216860bc7fa14b0] | committer: Paul B Mahol
>
> avfilter: port pullup filter from libmpcodecs
>
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c774459a95833014163ebfdf216860bc7fa14b0
[...]
> +static int alloc_metrics(PullupContext *s, PullupField *f)
> +{
> + f->diffs = av_calloc(FFALIGN(s->metric_length, 16), sizeof(*f->diffs));
> + f->combs = av_calloc(FFALIGN(s->metric_length, 16), sizeof(*f->combs));
> + f->vars = av_calloc(FFALIGN(s->metric_length, 16), sizeof(*f->vars));
> +
> + if (!f->diffs || !f->combs || !f->vars) {
> + av_freep(&f->diffs);
> + av_freep(&f->combs);
> + av_freep(&f->vars);
> + return AVERROR(ENOMEM);
> + }
> + return 0;
> +}
> +
> +static PullupField *make_field_queue(PullupContext *s, int len)
> +{
> + PullupField *head, *f;
> +
> + f = head = av_mallocz(sizeof(*head));
> + if (!f)
> + return NULL;
> +
> + if (alloc_metrics(s, f) < 0) {
> + av_free(f);
> + return NULL;
> + }
> +
> + for (; len > 0; len--) {
> + f->next = av_mallocz(sizeof(*f->next));
> + if (!f->next)
> + return NULL;
> +
> + f->next->prev = f;
> + f = f->next;
> + if (alloc_metrics(s, f) < 0)
> + return NULL;
these returns leak memory
(CID1108604)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20131020/fd688b94/attachment.asc>
More information about the ffmpeg-cvslog
mailing list