summaryrefslogtreecommitdiff
path: root/gst/timecode
diff options
context:
space:
mode:
authorVivia Nikolaidou <vivia@ahiru.eu>2018-10-04 12:07:31 +0300
committerVivia Nikolaidou <vivia@ahiru.eu>2018-10-04 12:40:45 +0300
commitd89104c57fe6e6d44e24ff036483c31b62e74cfe (patch)
tree6fbd1eef341f74b9f5e3982feaf8c845af6b965b /gst/timecode
parentfaf212cd3a26ced3008476c856fcd15760fc4cf0 (diff)
avwait: Fix sending of dropping=true messages
If the first audio buffer to be dropped started right between two video buffers (after the end of the first but before the start of the second, as is often the case with N/1001 video frame rates), we would miss sending the dropping=true message. https://bugzilla.gnome.org/show_bug.cgi?id=797248
Diffstat (limited to 'gst/timecode')
-rw-r--r--gst/timecode/gstavwait.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/timecode/gstavwait.c b/gst/timecode/gstavwait.c
index ba02aa717..4ab5a4de9 100644
--- a/gst/timecode/gstavwait.c
+++ b/gst/timecode/gstavwait.c
@@ -1074,6 +1074,12 @@ gst_avwait_asink_chain (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
esign, GST_TIME_ARGS (running_time_at_end));
gst_buffer_unref (inbuf);
inbuf = NULL;
+ if (current_running_time >= self->audio_running_time_to_end_at &&
+ (self->must_send_end_message & END_MESSAGE_STREAM_ENDED) &&
+ !(self->must_send_end_message & END_MESSAGE_AUDIO_PUSHED)) {
+ send_element_message = TRUE;
+ }
+
} else if (gst_avwait_compare_guint64_with_signs (esign, running_time_at_end,
1, self->audio_running_time_to_wait_for) >= 0
&& gst_avwait_compare_guint64_with_signs (esign, running_time_at_end, 1,