mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
[MOVED FROM GST-P-FARSIGHT] Don't try to set the discont flag if the duration of the previous incoming buffer was not valid
20080403004012-3e2dc-6f95520c928c347508bdf6188c873ed724ad2dd7.gz
This commit is contained in:
parent
dc27b8f569
commit
56757b3ae2
1 changed files with 11 additions and 7 deletions
|
@ -827,8 +827,11 @@ gst_live_live_adder_chain (GstPad *pad, GstBuffer *buffer)
|
|||
GST_TIME_ARGS (padprivate->next_timestamp),
|
||||
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
|
||||
|
||||
padprivate->next_timestamp = GST_BUFFER_TIMESTAMP (buffer) +
|
||||
GST_BUFFER_DURATION (buffer);
|
||||
if ( GST_BUFFER_DURATION_IS_VALID(buffer))
|
||||
padprivate->next_timestamp = GST_BUFFER_TIMESTAMP (buffer) +
|
||||
GST_BUFFER_DURATION (buffer);
|
||||
else
|
||||
padprivate->next_timestamp = GST_CLOCK_TIME_NONE;
|
||||
|
||||
buffer = gst_buffer_make_metadata_writable (buffer);
|
||||
|
||||
|
@ -1083,8 +1086,7 @@ gst_live_adder_loop (gpointer data)
|
|||
goto again;
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (adder->next_timestamp) &&
|
||||
GST_BUFFER_TIMESTAMP (buffer) != adder->next_timestamp)
|
||||
{
|
||||
GST_BUFFER_TIMESTAMP (buffer) != adder->next_timestamp) {
|
||||
if (llabs (GST_BUFFER_TIMESTAMP (buffer) - adder->next_timestamp) <
|
||||
GST_SECOND / adder->rate) {
|
||||
GST_BUFFER_TIMESTAMP (buffer) = adder->next_timestamp;
|
||||
|
@ -1098,15 +1100,17 @@ gst_live_adder_loop (gpointer data)
|
|||
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
|
||||
}
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (adder, "Continuous buffer");
|
||||
GST_BUFFER_FLAG_UNSET(buffer, GST_BUFFER_FLAG_DISCONT);
|
||||
}
|
||||
|
||||
GST_BUFFER_OFFSET(buffer) = GST_BUFFER_OFFSET_NONE;
|
||||
GST_BUFFER_OFFSET_END(buffer) = GST_BUFFER_OFFSET_NONE;
|
||||
|
||||
adder->next_timestamp = GST_BUFFER_TIMESTAMP (buffer) +
|
||||
GST_BUFFER_DURATION (buffer);
|
||||
if (GST_BUFFER_DURATION_IS_VALID (buffer))
|
||||
adder->next_timestamp = GST_BUFFER_TIMESTAMP (buffer) +
|
||||
GST_BUFFER_DURATION (buffer);
|
||||
else
|
||||
adder->next_timestamp = GST_CLOCK_TIME_NONE;
|
||||
|
||||
if (adder->segment_pending)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue