[Bug 797145] avwait: Send dropping=true message after all streams stopped
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Sep 17 11:32:29 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=797145
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #373656|none |needs-work
status| |
--- Comment #3 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 373656:
--> (https://bugzilla.gnome.org/review?bug=797145&attachment=373656)
::: gst/timecode/gstavwait.c
@@ +809,3 @@
if (self->recording) {
self->audio_running_time_to_end_at =
self->running_time_to_end_at;
+ self->must_send_end_message = 1;
Should be |=
@@ +871,3 @@
/* We just stopped recording: synchronise the audio */
self->audio_running_time_to_end_at = running_time;
+ self->must_send_end_message = 1;
Should be |=
@@ +931,3 @@
+ }
+ g_mutex_lock (&self->mutex);
+ if ((self->must_send_end_message & 4) != 0) {
This should probably check 2 | 4?
@@ +936,3 @@
+ gst_avwait_send_element_message (self, TRUE,
+ self->audio_running_time_to_end_at);
+ } else if (self->must_send_end_message == 1) {
== 1? Or & 1?
@@ +1093,3 @@
gst_audio_buffer_clip (inbuf, &asegment2, self->ainfo.rate,
self->ainfo.bpf);
+ if (self->must_send_end_message >= 1) {
For flags always use bitwise operations. It's semantically not an integer
@@ +1094,3 @@
self->ainfo.bpf);
+ if (self->must_send_end_message >= 1) {
+ send_element_message = TRUE;
This should probably be |= 4 with the flags? The boolean seems unnecessary
::: gst/timecode/gstavwait.h
@@ +93,3 @@
+ * Then the next chain function pushes its own buffer and sets it back to 0
+ */
+ gint must_send_end_message;
Please use #defines for this :)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list