mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
typefindelement: Propagate input buffer PTS and DTS
The initial buffers (that were used for timestamping) might have PTS and DTS set. In order to forward those properly, get the initial PTS/DTS from the adapter and set them on the reconstructed output buffer. https://bugzilla.gnome.org/show_bug.cgi?id=733291
This commit is contained in:
parent
4dca9a79a2
commit
f1abac1109
1 changed files with 5 additions and 0 deletions
|
@ -540,6 +540,7 @@ stop_typefinding (GstTypeFindElement * typefind)
|
|||
gboolean push_cached_buffers;
|
||||
gsize avail;
|
||||
GstBuffer *buffer;
|
||||
GstClockTime pts, dts;
|
||||
|
||||
gst_element_get_state (GST_ELEMENT (typefind), &state, NULL, 0);
|
||||
|
||||
|
@ -557,7 +558,11 @@ stop_typefinding (GstTypeFindElement * typefind)
|
|||
if (avail == 0)
|
||||
goto no_data;
|
||||
|
||||
pts = gst_adapter_prev_pts (typefind->adapter, NULL);
|
||||
dts = gst_adapter_prev_dts (typefind->adapter, NULL);
|
||||
buffer = gst_adapter_take_buffer (typefind->adapter, avail);
|
||||
GST_BUFFER_PTS (buffer) = pts;
|
||||
GST_BUFFER_DTS (buffer) = dts;
|
||||
GST_OBJECT_UNLOCK (typefind);
|
||||
|
||||
if (!push_cached_buffers) {
|
||||
|
|
Loading…
Reference in a new issue