Fix for Andy's GstBuffer->GstData changes

Original commit message from CVS:
Fix for Andy's GstBuffer->GstData changes
This commit is contained in:
Ronald S. Bultje 2003-10-14 10:09:11 +00:00
parent a365faa43a
commit 0775f2156e

View file

@ -136,8 +136,8 @@ static void dxr3audiosink_set_scr (Dxr3AudioSink *sink,
static gboolean dxr3audiosink_handle_event (GstPad *pad,
GstEvent *event);
static void dxr3audiosink_chain_pcm (GstPad *pad,GstBuffer *buf);
static void dxr3audiosink_chain_ac3 (GstPad *pad, GstBuffer *buf);
static void dxr3audiosink_chain_pcm (GstPad *pad,GstData *buf);
static void dxr3audiosink_chain_ac3 (GstPad *pad, GstData *buf);
/* static void dxr3audiosink_wait (Dxr3AudioSink *sink, */
/* GstClockTime time); */
@ -571,22 +571,25 @@ dxr3audiosink_handle_event (GstPad *pad, GstEvent *event)
static void
dxr3audiosink_chain_pcm (GstPad *pad, GstBuffer *buf)
dxr3audiosink_chain_pcm (GstPad *pad, GstData *_data)
{
Dxr3AudioSink *sink;
gint bytes_written = 0;
GstBuffer *buf;
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL);
g_return_if_fail (_data != NULL);
sink = DXR3AUDIOSINK (gst_pad_get_parent (pad));
if (GST_IS_EVENT (buf)) {
dxr3audiosink_handle_event (pad, GST_EVENT (buf));
if (GST_IS_EVENT (_data)) {
dxr3audiosink_handle_event (pad, GST_EVENT (_data));
return;
}
buf = GST_BUFFER (_data);
if (sink->mode != DXR3AUDIOSINK_MODE_PCM) {
/* Switch to PCM mode. */
dxr3audiosink_set_mode_pcm (sink);
@ -633,22 +636,25 @@ dxr3audiosink_chain_pcm (GstPad *pad, GstBuffer *buf)
static void
dxr3audiosink_chain_ac3 (GstPad *pad, GstBuffer *buf)
dxr3audiosink_chain_ac3 (GstPad *pad, GstData *_data)
{
Dxr3AudioSink *sink;
gint bytes_written = 0;
GstBuffer *buf;
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL);
g_return_if_fail (_data != NULL);
sink = DXR3AUDIOSINK (gst_pad_get_parent (pad));
if (GST_IS_EVENT (buf)) {
dxr3audiosink_handle_event (pad, GST_EVENT (buf));
if (GST_IS_EVENT (_data)) {
dxr3audiosink_handle_event (pad, GST_EVENT (_data));
return;
}
buf = GST_BUFFER (_data);
if (sink->mode != DXR3AUDIOSINK_MODE_AC3) {
/* Switch to AC3 mode. */
dxr3audiosink_set_mode_ac3 (sink);