From b4820460d887fdd14844af74ee3d010b1f98d530 Mon Sep 17 00:00:00 2001 From: Simon Farnsworth Date: Fri, 21 Feb 2014 14:31:59 +0000 Subject: [PATCH] v4l2src: Flag interlaced buffers as interlaced. We correctly indicate the field ordering on interlaced buffers, but fail to flag them as containing interlaced video, which we need to do here because we signal interlace-mode=mixed in our caps. This means that downstream elements (like vaapipostproc from gstreamer-vaapi) don't recognise these buffers as in need of deinterlacing. Fix this by setting the interlaced flag on all interlaced buffers. Signed-off-by: Simon Farnsworth https://bugzilla.gnome.org/show_bug.cgi?id=724899 --- sys/v4l2/gstv4l2bufferpool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index c6fcb206d2..0272d2ac4e 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -969,9 +969,11 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer) /* set top/bottom field first if v4l2_buffer has the information */ if (vbuffer.field == V4L2_FIELD_INTERLACED_TB) { + GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); } if (vbuffer.field == V4L2_FIELD_INTERLACED_BT) { + GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); } if (GST_VIDEO_INFO_FORMAT (&obj->info) == GST_VIDEO_FORMAT_ENCODED) {