Pārlūkot izejas kodu

avfilter/vf_frei0r: fix time when input is realigned

av_frame_copy doesn't copy the input's PTS property, which resulted
in the frei0r filter always receiving the same static time.

Example that has a static distortion without patch:

ffmpeg -filter_complex "testsrc2=s=328x240:d=5,frei0r=distort0r" out.mp4
Stefan Breunig 6 dienas atpakaļ
vecāks
revīzija
f8bfc20281
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      libavfilter/vf_frei0r.c

+ 4 - 0
libavfilter/vf_frei0r.c

@@ -375,6 +375,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
         if (!in2)
         if (!in2)
             goto fail;
             goto fail;
         av_frame_copy(in2, in);
         av_frame_copy(in2, in);
+        if (av_frame_copy_props(in2, in) < 0) {
+            av_frame_free(&in2);
+            goto fail;
+        }
         av_frame_free(&in);
         av_frame_free(&in);
         in = in2;
         in = in2;
     }
     }