mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
check error code correctly
Original commit message from CVS: check error code correctly
This commit is contained in:
parent
571a5cd7a6
commit
0c922cc90d
2 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-06-02 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* ext/alsa/gstalsaclock.c: (gst_alsa_clock_get_type):
|
||||||
|
* ext/alsa/gstalsasrc.c: (gst_alsa_src_loop):
|
||||||
|
check error condition on available samples correctly
|
||||||
|
|
||||||
2004-06-02 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-06-02 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* ext/alsa/gstalsasrc.c: (gst_alsa_src_get_time):
|
* ext/alsa/gstalsasrc.c: (gst_alsa_src_get_time):
|
||||||
|
|
|
@ -329,11 +329,19 @@ gst_alsa_src_loop (GstElement * element)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((avail = gst_alsa_update_avail (this)) < this->period_size) {
|
/* the cast to long is explicitly needed;
|
||||||
if (avail == -EPIPE)
|
* with avail = -32 and period_size = 100, avail < period_size is false */
|
||||||
|
while ((avail = gst_alsa_update_avail (this)) < (long) this->period_size) {
|
||||||
|
if (avail == -EPIPE) {
|
||||||
|
GST_DEBUG_OBJECT (this, "got EPIPE when checking for available bytes");
|
||||||
continue;
|
continue;
|
||||||
if (avail < 0)
|
}
|
||||||
|
if (avail < 0) {
|
||||||
|
GST_DEBUG_OBJECT (this,
|
||||||
|
"got error %s (%d) when checking for available bytes",
|
||||||
|
snd_strerror (avail));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (snd_pcm_state (this->handle) != SND_PCM_STATE_RUNNING) {
|
if (snd_pcm_state (this->handle) != SND_PCM_STATE_RUNNING) {
|
||||||
if (!gst_alsa_start (this))
|
if (!gst_alsa_start (this))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue