mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
ext/alsa/gstalsasink.c: use correct variable when determining amount of data to skip so we don't skip into the void a...
Original commit message from CVS: * ext/alsa/gstalsasink.c: (gst_alsa_sink_loop): use correct variable when determining amount of data to skip so we don't skip into the void and segfault
This commit is contained in:
parent
17f0908981
commit
f9c5d22fbe
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-05-17 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* ext/alsa/gstalsasink.c: (gst_alsa_sink_loop):
|
||||
use correct variable when determining amount of data to skip so we
|
||||
don't skip into the void and segfault
|
||||
|
||||
2004-05-16 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_audio_caps):
|
||||
|
|
|
@ -335,6 +335,7 @@ gst_alsa_sink_loop (GstElement * element)
|
|||
g_return_if_fail (sink != NULL);
|
||||
|
||||
sink_restart:
|
||||
g_print ("start: %p, %u\n", sink->data[0], sink->size[0]);
|
||||
|
||||
avail = gst_alsa_update_avail (this);
|
||||
if (avail == -EPIPE)
|
||||
|
@ -441,7 +442,7 @@ sink_restart:
|
|||
sink->buf[i] = NULL;
|
||||
continue;
|
||||
} else if (sample_diff < 0) {
|
||||
gint difference = gst_alsa_samples_to_bytes (this, -samplestamp);
|
||||
gint difference = gst_alsa_samples_to_bytes (this, -sample_diff);
|
||||
|
||||
GST_INFO_OBJECT (this,
|
||||
"Skipping %lu samples to resync: sample %lu expected, but got %ld",
|
||||
|
@ -475,6 +476,7 @@ sink_restart:
|
|||
}
|
||||
|
||||
/* FIXME: lotsa stuff can have happened while fetching data. Do we need to check something? */
|
||||
g_print ("transmit: %p, %u\n", sink->data[0], sink->size[0]);
|
||||
|
||||
/* put this data into alsa */
|
||||
if ((copied = this->transmit (this, &avail)) < 0)
|
||||
|
|
Loading…
Reference in a new issue