mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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.
This commit is contained in:
parent
1ca2c78c7a
commit
516d6bb3e2
1 changed files with 11 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue