diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-12-09 14:01:51 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-12-09 14:01:51 +0200 |
commit | 30f8595780c0475d83b8950b3a4922e850aafbd0 (patch) | |
tree | c3b23d82fbdccd8f612830ce990b50063383e35b /examples | |
parent | ea888a0e3baa106f926d0ded1fd5501a6aae6bd5 (diff) |
playback-tutorial-3/basic-tutorial-8: Fix buffer duration calculations
Same as last commit in various other places
https://bugzilla.gnome.org/show_bug.cgi?id=791408
Diffstat (limited to 'examples')
-rw-r--r-- | examples/tutorials/playback-tutorial-3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/tutorials/playback-tutorial-3.c b/examples/tutorials/playback-tutorial-3.c index cea556f..0362dc9 100644 --- a/examples/tutorials/playback-tutorial-3.c +++ b/examples/tutorials/playback-tutorial-3.c @@ -36,7 +36,7 @@ static gboolean push_data (CustomData *data) { /* Set its timestamp and duration */ GST_BUFFER_TIMESTAMP (buffer) = gst_util_uint64_scale (data->num_samples, GST_SECOND, SAMPLE_RATE); - GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale (CHUNK_SIZE, GST_SECOND, SAMPLE_RATE); + GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale (num_samples, GST_SECOND, SAMPLE_RATE); /* Generate some psychodelic waveforms */ gst_buffer_map (buffer, &map, GST_MAP_WRITE); |