summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomislav Tustonic <tomislavtustonic@gmail.com>2018-06-13 10:58:38 +0300
committerSebastian Dröge <sebastian@centricular.com>2018-06-13 10:58:38 +0300
commit9b5958a22124c03cc8007e1353c511c5cc6a7aae (patch)
treedf96463d01f109d082fdab870525fd5469d70610
parent7aea060a60ccd5e9f3a82021351d594a27441462 (diff)
basic-tutorial-13: Step events need absolute values for the rateHEADmaster
They can't change playback direction but are based on the current playback direction. https://bugzilla.gnome.org/show_bug.cgi?id=796503
-rw-r--r--examples/tutorials/basic-tutorial-13.c2
-rw-r--r--markdown/tutorials/basic/playback-speed.md4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/tutorials/basic-tutorial-13.c b/examples/tutorials/basic-tutorial-13.c
index 5c9c2ef..990b2b5 100644
--- a/examples/tutorials/basic-tutorial-13.c
+++ b/examples/tutorials/basic-tutorial-13.c
@@ -75,7 +75,7 @@ static gboolean handle_keyboard (GIOChannel *source, GIOCondition cond, CustomDa
}
gst_element_send_event (data->video_sink,
- gst_event_new_step (GST_FORMAT_BUFFERS, 1, data->rate, TRUE, FALSE));
+ gst_event_new_step (GST_FORMAT_BUFFERS, 1, ABS (data->rate), TRUE, FALSE));
g_print ("Stepping one frame\n");
break;
case 'q':
diff --git a/markdown/tutorials/basic/playback-speed.md b/markdown/tutorials/basic/playback-speed.md
index c14ecf1..77b4a22 100644
--- a/markdown/tutorials/basic/playback-speed.md
+++ b/markdown/tutorials/basic/playback-speed.md
@@ -141,7 +141,7 @@ static gboolean handle_keyboard (GIOChannel *source, GIOCondition cond, CustomDa
}
gst_element_send_event (data->video_sink,
- gst_event_new_step (GST_FORMAT_BUFFERS, 1, data->rate, TRUE, FALSE));
+ gst_event_new_step (GST_FORMAT_BUFFERS, 1, ABS (data->rate), TRUE, FALSE));
g_print ("Stepping one frame\n");
break;
case 'q':
@@ -345,7 +345,7 @@ case 'n':
}
gst_element_send_event (data->video_sink,
- gst_event_new_step (GST_FORMAT_BUFFERS, 1, data->rate, TRUE, FALSE));
+ gst_event_new_step (GST_FORMAT_BUFFERS, 1, ABS (data->rate), TRUE, FALSE));
g_print ("Stepping one frame\n");
break;
```