mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
examples: don't put things with side effects inside g_assert()
They will be defined away to NOOPs otherwise in release builds.
This commit is contained in:
parent
70393ddfb3
commit
c354714544
1 changed files with 6 additions and 4 deletions
|
@ -123,8 +123,9 @@ main (int argc, char *argv[])
|
|||
|
||||
/* step two frames, flush so that new preroll is queued */
|
||||
g_message ("stepping three frames");
|
||||
g_assert (gst_element_send_event (bin,
|
||||
gst_event_new_step (GST_FORMAT_BUFFERS, 2, 1.0, TRUE, FALSE)));
|
||||
if (!gst_element_send_event (bin,
|
||||
gst_event_new_step (GST_FORMAT_BUFFERS, 2, 1.0, TRUE, FALSE)))
|
||||
g_warning ("Filed to send STEP event!");
|
||||
|
||||
/* blocks and returns when we received the step done message */
|
||||
event_loop (bin);
|
||||
|
@ -138,9 +139,10 @@ main (int argc, char *argv[])
|
|||
|
||||
/* step 3 frames, flush so that new preroll is queued */
|
||||
g_message ("stepping 120 milliseconds ");
|
||||
g_assert (gst_element_send_event (bin,
|
||||
if (!gst_element_send_event (bin,
|
||||
gst_event_new_step (GST_FORMAT_TIME, 120 * GST_MSECOND, 1.0, TRUE,
|
||||
FALSE)));
|
||||
FALSE)))
|
||||
g_warning ("Filed to send STEP event!");
|
||||
|
||||
/* blocks and returns when we received the step done message */
|
||||
event_loop (bin);
|
||||
|
|
Loading…
Reference in a new issue