mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
videotestsrc: Don't set DTS on buffer
DTS is for encoded data and have no meaning for raw. It better to not set it, as it's confusing. https://bugzilla.gnome.org/show_bug.cgi?id=752791
This commit is contained in:
parent
315857dce6
commit
7db376d05e
1 changed files with 4 additions and 4 deletions
|
@ -857,7 +857,7 @@ gst_video_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
|
||||||
{
|
{
|
||||||
/* for live sources, sync on the timestamp of the buffer */
|
/* for live sources, sync on the timestamp of the buffer */
|
||||||
if (gst_base_src_is_live (basesrc)) {
|
if (gst_base_src_is_live (basesrc)) {
|
||||||
GstClockTime timestamp = GST_BUFFER_DTS (buffer);
|
GstClockTime timestamp = GST_BUFFER_PTS (buffer);
|
||||||
|
|
||||||
if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
|
if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
|
||||||
/* get duration to calculate end time */
|
/* get duration to calculate end time */
|
||||||
|
@ -945,11 +945,11 @@ gst_video_test_src_fill (GstPushSrc * psrc, GstBuffer * buffer)
|
||||||
if (!gst_video_frame_map (&frame, &src->info, buffer, GST_MAP_WRITE))
|
if (!gst_video_frame_map (&frame, &src->info, buffer, GST_MAP_WRITE))
|
||||||
goto invalid_frame;
|
goto invalid_frame;
|
||||||
|
|
||||||
GST_BUFFER_DTS (buffer) =
|
GST_BUFFER_PTS (buffer) =
|
||||||
src->accum_rtime + src->timestamp_offset + src->running_time;
|
src->accum_rtime + src->timestamp_offset + src->running_time;
|
||||||
GST_BUFFER_PTS (buffer) = GST_BUFFER_DTS (buffer);
|
GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
|
||||||
|
|
||||||
gst_object_sync_values (GST_OBJECT (psrc), GST_BUFFER_DTS (buffer));
|
gst_object_sync_values (GST_OBJECT (psrc), GST_BUFFER_PTS (buffer));
|
||||||
|
|
||||||
src->make_image (src, &frame);
|
src->make_image (src, &frame);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue