[FFmpeg-devel] [PATCH] avfilter: Port mp=softpulldown to lavfi

wm4 nfxjfg at googlemail.com
Wed Jan 28 12:05:57 CET 2015


On Wed, 28 Jan 2015 10:10:37 +0000
Paul B Mahol <onemda at gmail.com> wrote:

> On 1/27/15, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Tue, Jan 27, 2015 at 11:14:36AM +0000, Paul B Mahol wrote:
> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> >> ---
> >> Not-bitexact, dunno why. Do not have actual samples to test.
> >
> > this change is needed:
> >
> > @@ -134,6 +134,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame
> > *in)
> >              ret = ff_filter_frame(outlink, new);
> >              state = 0;
> >          } else {
> > +            av_frame_make_writable(out);
> >              for (i = 0; i < s->nb_planes; i++) {
> >                  av_image_copy_plane(out->data[i], out->linesize[i] * 2,
> >                                      in->data[i], in->linesize[i] * 2,
> >
> > and should be ok if its bitexact with that (didnt try)
> 
> I tried this: added it right bellow out = s->frame; and it only changed speed
> at which video is played. Visually it is same as before.

"out" is set from an input frame (using av_frame_clone()), so it's just
a reference which potentially shares data with other references.

Thus, av_frame_make_writable() is absolutely required.


More information about the ffmpeg-devel mailing list