[FFmpeg-cvslog] avfilter/vf_telecine: Make frame writable before writing into it

Michael Niedermayer git at videolan.org
Sat Aug 13 16:30:02 EEST 2016


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 14 17:13:51 2016 +0200| [694d37eb52ad296db8e038766750207ad61094e8] | committer: Michael Niedermayer

avfilter/vf_telecine: Make frame writable before writing into it

Fixes Ticket 5627

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit fa0097e008a145ea8324879d4e24c1881bb86279)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=694d37eb52ad296db8e038766750207ad61094e8
---

 libavfilter/vf_telecine.c                | 2 ++
 tests/ref/fate/filter-pixfmts-fieldmatch | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c
index 182c670..58babca 100644
--- a/libavfilter/vf_telecine.c
+++ b/libavfilter/vf_telecine.c
@@ -190,6 +190,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
     }
 
     if (s->occupied) {
+        av_frame_make_writable(s->frame[nout]);
         for (i = 0; i < s->nb_planes; i++) {
             // fill in the EARLIER field from the buffered pic
             av_image_copy_plane(s->frame[nout]->data[i] + s->frame[nout]->linesize[i] * s->first_field,
@@ -213,6 +214,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
 
     while (len >= 2) {
         // output THIS image as-is
+        av_frame_make_writable(s->frame[nout]);
         for (i = 0; i < s->nb_planes; i++)
             av_image_copy_plane(s->frame[nout]->data[i], s->frame[nout]->linesize[i],
                                 inpicref->data[i], inpicref->linesize[i],
diff --git a/tests/ref/fate/filter-pixfmts-fieldmatch b/tests/ref/fate/filter-pixfmts-fieldmatch
index 44622d0..99946c8 100644
--- a/tests/ref/fate/filter-pixfmts-fieldmatch
+++ b/tests/ref/fate/filter-pixfmts-fieldmatch
@@ -1,5 +1,5 @@
 yuv410p             a6c9b4065e8253d8120772f69be0bf04
 yuv411p             b913e634ad37ce046240252bed8681fb
-yuv420p             d448d95326eadeeb12ea0cc348067958
+yuv420p             a9286560141eb14595e427dbe5829b00
 yuv422p             11ad22ce00c5e8a30d0472f29fb15434
 yuv444p             9350a3f23cd7d95ec441a49f63f55953



More information about the ffmpeg-cvslog mailing list