mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 09:12:19 +00:00
avwait: Don't wait if audio_running_time_to_wait_for is NONE
The case is properly handled a few lines below by dropping the buffer. We shouldn't perpetually block the audio chain function until the target-timecode is reached. https://bugzilla.gnome.org/show_bug.cgi?id=796906
This commit is contained in:
parent
60542ec970
commit
8ede252a8a
1 changed files with 2 additions and 12 deletions
|
@ -836,15 +836,7 @@ gst_avwait_vsink_chain (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
|
||||||
gst_avwait_send_element_message (self, TRUE, running_time);
|
gst_avwait_send_element_message (self, TRUE, running_time);
|
||||||
} else if (running_time < self->running_time_to_wait_for
|
} else if (running_time < self->running_time_to_wait_for
|
||||||
&& self->running_time_to_wait_for != GST_CLOCK_TIME_NONE) {
|
&& self->running_time_to_wait_for != GST_CLOCK_TIME_NONE) {
|
||||||
/* We should set audio_running_time_to_wait_for to a value far enough
|
self->audio_running_time_to_wait_for = GST_CLOCK_TIME_NONE;
|
||||||
* in the future, so that it will never be reached. However, setting
|
|
||||||
* it to GST_CLOCK_TIME_NONE would eternally trigger the g_cond_wait
|
|
||||||
* in the audio chain function, causing audio upstream to be queued up
|
|
||||||
* forever. There is already code in place to ensure that audio will
|
|
||||||
* not exceed the video at the same place, so we just set it to
|
|
||||||
* GST_CLOCK_TIME_NONE - 1 here to ensure it will never be reached,
|
|
||||||
* but still not trigger the eternal waiting code */
|
|
||||||
self->audio_running_time_to_wait_for = GST_CLOCK_TIME_NONE - 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Recording is FALSE: we drop all buffers */
|
/* Recording is FALSE: we drop all buffers */
|
||||||
|
@ -959,9 +951,7 @@ gst_avwait_asink_chain (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
|
||||||
(video_running_time == GST_CLOCK_TIME_NONE
|
(video_running_time == GST_CLOCK_TIME_NONE
|
||||||
/* Wait if audio is after the video: dunno what to do */
|
/* Wait if audio is after the video: dunno what to do */
|
||||||
|| gst_avwait_compare_guint64_with_signs (asign,
|
|| gst_avwait_compare_guint64_with_signs (asign,
|
||||||
running_time_at_end, vsign, video_running_time) == 1
|
running_time_at_end, vsign, video_running_time) == 1)) {
|
||||||
/* Wait if we don't even know what to wait for yet */
|
|
||||||
|| self->audio_running_time_to_wait_for == GST_CLOCK_TIME_NONE)) {
|
|
||||||
g_cond_wait (&self->cond, &self->mutex);
|
g_cond_wait (&self->cond, &self->mutex);
|
||||||
vsign =
|
vsign =
|
||||||
gst_segment_to_running_time_full (&self->vsegment, GST_FORMAT_TIME,
|
gst_segment_to_running_time_full (&self->vsegment, GST_FORMAT_TIME,
|
||||||
|
|
Loading…
Reference in a new issue