gstreamer/tests/check/elements
Carlos Rafael Giani 6d4ad80b82 queue2: Fix missing/dropped buffering messages at startup
This fixes a bug that occurs when an attempt is made to post a buffering
message before the queue2 was assigned a bus. One common situation where
this happens is when the use-buffering property is set to TRUE before the
queue2 was added to a bin.

If the result of gst_element_post_message() is not checked, and the
aforementioned situation occurs, then last_posted_buffering_percent and
percent_changed will still be updated, as if posting the message succeeded.
Later attempts to post again will not do anything because the code then
assumes that a message with the same percentage was previously posted
successfully and posting again is redundant.

Updating these variables only if posting succeed and explicitely
posting a buffering message in the READY->PAUSED state change ensure that
a buffering message is posted as early as possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/297>
2020-05-27 13:07:03 +00:00
..
capsfilter.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
clocksync.c clocksync: Remove handoff signals 2020-05-04 09:21:02 +03:00
concat.c concat: Add unit tests for concat element 2014-08-12 15:39:09 +03:00
dataurisrc.c dataurisrc: Do not include trailing \0 into buffer 2019-10-07 17:47:47 +00:00
fakesink.c tests: fakesink: make notify stress test work better on Windows 2018-01-11 19:57:13 +00:00
fakesrc.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
fdsrc.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
filesink.c filesink: Use SYNC_AFTER flag in seeking test 2018-08-17 17:26:17 +03:00
filesrc.c tests: filesrc: more Windows fixes 2018-01-11 19:32:08 +00:00
funnel.c Fix typos in comments and docs 2018-05-01 11:18:03 +01:00
identity.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
leaks.c tests: Add test for new activity-tracking leaktracer API 2019-07-02 15:13:26 +05:30
multiqueue.c tests: multiqueue: Replace large test macro with function 2017-12-24 11:51:13 +01:00
queue.c documentation: fix a number of typos 2019-10-06 11:12:11 -04:00
queue2.c queue2: Fix missing/dropped buffering messages at startup 2020-05-27 13:07:03 +00:00
selector.c tests/input selector: Fix a shutdown crash 2020-05-07 03:30:43 +10:00
streamiddemux.c Fix typos in comments and docs 2018-05-01 11:18:03 +01:00
tee.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
valve.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00