From e73b1dcf5ee8b47d023e4242fd91f0c5a66d9e34 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 23 Jul 2003 18:37:53 +0000 Subject: - don't crash when compiled with alsa support and no alsa device is present for the sound capture (Closes GNOME bugzilla #118026) CVS patchset: 5209 CVS date: 2003/07/23 18:37:53 --- src/input/input_v4l.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index eb7659e51..aa257d032 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -1067,7 +1067,7 @@ int open_audio_capture_device(v4l_input_plugin_t *this) * too, otherwise we will loose videoframes because we keep on waiting * for an audio fragment */ - PRINT("Audio :( Error opening PCM device %s\n", this->pcm_name); + DBGPRINT("Audio :( Error opening PCM device %s\n", this->pcm_name); this->audio_capture = 0; } @@ -1350,7 +1350,7 @@ static buf_element_t *v4l_plugin_read_block (input_plugin_t *this_gen, ptr = this->video_buf + this->gb_buffers.offsets[this->gb_frame]; buf->pts = get_time(); /* this->stream->xine->clock->get_current_time(this->stream->xine->clock); */ xine_fast_memcpy (buf->content, ptr, this->frame_size); - } else { + } else if (this->audio_capture) { #ifdef HAVE_ALSA /* Record audio */ -- cgit v1.2.3