summaryrefslogtreecommitdiffstats
path: root/ext/faad
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-08-16 09:54:10 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-08-16 09:54:10 +0000
commitea28d448c6b96283f1abb3130c9958e74a1d4a1a (patch)
treecb1379a8a30c524a1dd7dc995cae7e9bffce09c1 /ext/faad
parent638a8faf1386cab8fb66c068912f7500cd119e1f (diff)
downloadgst-plugins-bad-ea28d448c6b96283f1abb3130c9958e74a1d4a1a.tar.gz
gst-plugins-bad-ea28d448c6b96283f1abb3130c9958e74a1d4a1a.tar.bz2
gst-plugins-bad-ea28d448c6b96283f1abb3130c9958e74a1d4a1a.zip
Handle _push() return values.
Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_event), (gst_faad_chain): * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header): Handle _push() return values.
Diffstat (limited to 'ext/faad')
-rw-r--r--ext/faad/gstfaad.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index 886193cc..0ad592b7 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -669,6 +669,9 @@ gst_faad_event (GstPad * pad, GstEvent * event)
GST_STREAM_UNLOCK (pad);
break;
}
+ case GST_EVENT_FLUSH_START:
+ res = gst_pad_push_event (faad->srcpad, event);
+ break;
default:
GST_STREAM_LOCK (pad);
res = gst_pad_push_event (faad->srcpad, event);
@@ -839,7 +842,7 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
r = gst_pad_alloc_buffer (faad->srcpad, 0, bufsize, caps, &outbuf);
if (r != GST_FLOW_OK) {
GST_DEBUG ("Failed to allocate buffer");
- ret = GST_FLOW_OK; /* CHECK: or return something else? */
+ ret = r; //GST_FLOW_OK; /* CHECK: or return something else? */
goto out;
}
@@ -855,7 +858,9 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
GST_DEBUG ("pushing buffer, off=%" G_GUINT64_FORMAT ", ts=%"
GST_TIME_FORMAT, GST_BUFFER_OFFSET (outbuf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)));
- gst_pad_push (faad->srcpad, outbuf);
+ if ((ret = gst_pad_push (faad->srcpad, outbuf)) != GST_FLOW_OK &&
+ ret != GST_FLOW_NOT_LINKED)
+ goto out;
}
}
}