From: Tim-Philipp Müller Date: Fri, 21 Feb 2014 19:46:44 +0000 (+0000) Subject: v4l2src: also unset INTERLACED flag on buffers if frame is not interlaced X-Git-Tag: 1.3.1~213 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5535a824a40154b96e50eb46d4ed0b9c78e662d0;p=platform%2Fupstream%2Fgst-plugins-good.git v4l2src: also unset INTERLACED flag on buffers if frame is not interlaced https://bugzilla.gnome.org/show_bug.cgi?id=724899 --- diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index 0272d2a..523d306 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -971,11 +971,14 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer) 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) { + } else 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); + } else { + GST_BUFFER_FLAG_UNSET (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) { if (vbuffer.flags & V4L2_BUF_FLAG_KEYFRAME) GST_BUFFER_FLAG_UNSET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);