[FFmpeg-devel] [PATCH] avfilter: port qp filter from libmpcodecs
Clément Bœsch
u at pkh.me
Wed Sep 18 23:32:19 CEST 2013
On Wed, Sep 18, 2013 at 06:34:36PM +0000, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> doc/filters.texi | 32 ++++++++++
> libavfilter/Makefile | 1 +
> libavfilter/allfilters.c | 1 +
> libavfilter/vf_qp.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 188 insertions(+)
> create mode 100644 libavfilter/vf_qp.c
>
[...]
> +static int filter_frame(AVFilterLink *inlink, AVFrame *in)
> +{
> + AVFilterContext *ctx = inlink->dst;
> + AVFilterLink *outlink = ctx->outputs[0];
> + QPContext *s = ctx->priv;
> + AVFrame *out;
> +
> + if (!s->qp_expr_str || ctx->is_disabled)
> + return ff_filter_frame(outlink, in);
> +
> + out = av_frame_clone(in);
> + if (!out) {
> + av_frame_free(&in);
> + return AVERROR(ENOMEM);
> + }
> +
> + out->qscale_table = s->qp;
So the table is valid for an undefined amount of time? With the ref
counting API, I believe this is not the desired behaviour.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130918/8294d84b/attachment.asc>
More information about the ffmpeg-devel
mailing list