summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-02-20 09:15:05 -0600
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-02-20 10:55:49 -0600
commit516d6bb3e2ceb8d1f308fbffbc2e697370b97ebe (patch)
tree4d1a2b53c065b9ae152210132c36775f95d6ffa7
parent1ca2c78c7acc0255feb876233f5c79ef1a634c71 (diff)
vaapipostproc: set discont flag at vpp deinterlacing
When deinterlacing with VPP the discont flag was not forwarded to the new created buffer. This patch sets the discont flag if input buffer has it.
-rw-r--r--gst/vaapi/gstvaapipostproc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index e0f6aebb25..29c8406b4d 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -615,7 +615,7 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
GstBuffer *fieldbuf;
GstVaapiDeinterlaceMethod deint_method;
guint flags, deint_flags;
- gboolean tff, deint, deint_refs, deint_changed;
+ gboolean tff, deint, deint_refs, deint_changed, discont;
const GstVideoCropMeta *crop_meta;
GstVaapiRectangle *crop_rect = NULL;
GstVaapiRectangle tmp_rect;
@@ -639,6 +639,7 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
timestamp = GST_BUFFER_TIMESTAMP (inbuf);
tff = GST_BUFFER_FLAG_IS_SET (inbuf, GST_VIDEO_BUFFER_FLAG_TFF);
+ discont = GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DISCONT);
deint = should_deinterlace_buffer (postproc, inbuf);
/* Drop references if deinterlacing conditions changed */
@@ -721,6 +722,11 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
GST_BUFFER_TIMESTAMP (fieldbuf) = timestamp;
GST_BUFFER_DURATION (fieldbuf) = postproc->field_duration;
+ if (discont) {
+ GST_BUFFER_FLAG_SET (fieldbuf, GST_BUFFER_FLAG_DISCONT);
+ discont = FALSE;
+ }
+
ret = gst_pad_push (trans->srcpad, fieldbuf);
if (ret != GST_FLOW_OK)
goto error_push_buffer;
@@ -771,6 +777,10 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
else {
GST_BUFFER_TIMESTAMP (outbuf) = timestamp + postproc->field_duration;
GST_BUFFER_DURATION (outbuf) = postproc->field_duration;
+ if (discont) {
+ GST_BUFFER_FLAG_SET (fieldbuf, GST_BUFFER_FLAG_DISCONT);
+ discont = FALSE;
+ }
}
if (deint && deint_refs)