[FFmpeg-cvslog] vf_overlay: prevent premature freeing of cur_buf

Nicolas George nicolas.george at normalesup.org
Thu Jul 26 23:17:42 CEST 2012


Le nonidi 9 thermidor, an CCXX, Michael Niedermayer a écrit :
> @@ -238,6 +238,7 @@ static int start_frame_overlay(AVFilterLink *inlink, AVFilterBufferRef *inpicref
>      AVFilterContext *ctx = inlink->dst;
>      OverlayContext *over = ctx->priv;
>  
> +    inlink->cur_buf  = NULL;
>      over->overpicref = inpicref;
>      over->overpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base,
>                                           ctx->outputs[0]->time_base);

They made the same mistake I made in 9c1d649 (and that the patch I sent a
few hours ago fixes). It's rather tasteless to put your name on a bogus
commit just because it was cherry-picked from a completely different, good,
commit.

For reference: cur_buf must not be freed in start_frame because it is
necessary for the frame auto-copy mechanism.

There are a few similar cases in the code, I will take the time to check
them individually.

Regards,

-- 
  Nicolas George
-------------- 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/20120726/d4733b80/attachment.asc>


More information about the ffmpeg-cvslog mailing list