[FFmpeg-devel] [PATCH] avfilter/vf_pullup: change parity to match original code

Paul B Mahol onemda at gmail.com
Wed Oct 2 23:43:40 CEST 2013


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---

This seems to fix sample that have top field flag set
(IMHO this should not matter at all as flags may be invalid or missing).
In the other case when frame do not have interlaced flag set it is still 0,
while original is 1, this should not matter as only one can be true per frame.

---
 libavfilter/vf_pullup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c
index a47f339..4ad441f 100644
--- a/libavfilter/vf_pullup.c
+++ b/libavfilter/vf_pullup.c
@@ -657,7 +657,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
                   (const uint8_t**)in->data, in->linesize,
                   inlink->format, inlink->w, inlink->h);
 
-    p = !!in->interlaced_frame;
+    p = in->interlaced_frame ? !in->top_field_first : 0;
     pullup_submit_field(s, b, p  );
     pullup_submit_field(s, b, p^1);
 
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list