From ee5fb6167b328d6857968a11db760bb22d253c08 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 27 Feb 2004 23:36:43 +0000 Subject: [PATCH] patches from jmmv@menta.net (Julio M. Merino Vidal) Original commit message from CVS: patches from jmmv@menta.net (Julio M. Merino Vidal) * gst/interleave/deinterleave.c: (deinterleave_chain): Fix GST_ELEMENT_ERROR call (bug #135634) * gst/interleave/interleave.c: (interleave_buffered_loop), (interleave_bytestream_loop): Don't use alloca() (bug #135640) * sys/cdrom/gstcdplayer_ioctl_bsd.h: Fix ioctls on NetBSD (bug #135645) * sys/oss/gstosssink.c: (gst_osssink_get_delay), (gst_osssink_chain): Fix ioctls on NetBSD. (bug #135644) * sys/v4l/v4lmjpegsrc_calls.c: (gst_v4lmjpegsrc_sync_next_frame), (gst_v4lmjpegsrc_set_capture), (gst_v4lmjpegsrc_set_capture_m), (gst_v4lmjpegsrc_capture_init), (gst_v4lmjpegsrc_requeue_frame): Fix GST_ELEMENT_ERROR call. * sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_try_palette): Fix GST_ELEMENT_ERROR call. --- ChangeLog | 18 ++++++++++++++++++ sys/oss/gstosssink.c | 10 ++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b36fb898c..1a6806df95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-02-27 David Schleef + + patches from jmmv@menta.net (Julio M. Merino Vidal) + + * gst/interleave/deinterleave.c: (deinterleave_chain): Fix + GST_ELEMENT_ERROR call (bug #135634) + * gst/interleave/interleave.c: (interleave_buffered_loop), + (interleave_bytestream_loop): Don't use alloca() (bug #135640) + * sys/cdrom/gstcdplayer_ioctl_bsd.h: Fix ioctls on NetBSD (bug #135645) + * sys/oss/gstosssink.c: (gst_osssink_get_delay), + (gst_osssink_chain): Fix ioctls on NetBSD. (bug #135644) + * sys/v4l/v4lmjpegsrc_calls.c: (gst_v4lmjpegsrc_sync_next_frame), + (gst_v4lmjpegsrc_set_capture), (gst_v4lmjpegsrc_set_capture_m), + (gst_v4lmjpegsrc_capture_init), (gst_v4lmjpegsrc_requeue_frame): + Fix GST_ELEMENT_ERROR call. + * sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_try_palette): Fix + GST_ELEMENT_ERROR call. + 2004-02-27 Benjamin Otte * gst-libs/gst/audio/audio.h: diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c index 4276cc6608..dd01b284af 100644 --- a/sys/oss/gstosssink.c +++ b/sys/oss/gstosssink.c @@ -261,11 +261,17 @@ static inline gint64 gst_osssink_get_delay (GstOssSink *osssink) { gint delay = 0; + gint ret; if (GST_OSSELEMENT (osssink)->fd == -1) return 0; - if (ioctl (GST_OSSELEMENT (osssink)->fd, SNDCTL_DSP_GETODELAY, &delay) < 0) { +#ifdef SNDCTL_DSP_GETODELAY + ret = ioctl (GST_OSSELEMENT (osssink)->fd, SNDCTL_DSP_GETODELAY, &delay); +#else + ret = -1; +#endif + if (ret < 0) { audio_buf_info info; if (ioctl (GST_OSSELEMENT (osssink)->fd, SNDCTL_DSP_GETOSPACE, &info) < 0) { delay = 0; @@ -337,7 +343,7 @@ gst_osssink_chain (GstPad *pad, GstData *_data) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_EOS: - ioctl (GST_OSSELEMENT (osssink)->fd, SNDCTL_DSP_SYNC); + ioctl (GST_OSSELEMENT (osssink)->fd, SNDCTL_DSP_SYNC, 0); gst_audio_clock_set_active (GST_AUDIO_CLOCK (osssink->provided_clock), FALSE); gst_pad_event_default (pad, event); return;