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.
This commit is contained in:
Ronald S. Bultje 2005-08-16 09:54:10 +00:00
parent 638a8faf13
commit ea28d448c6
4 changed files with 18 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2005-08-16 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/faad/gstfaad.c: (gst_faad_event), (gst_faad_chain):
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header):
Handle _push() return values.
2005-08-15 Ronald S. Bultje <rbultje@ronald.bitfreak.net> 2005-08-15 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/faad/gstfaad.c: (gst_faad_event): * ext/faad/gstfaad.c: (gst_faad_event):

2
common

@ -1 +1 @@
Subproject commit fae12c87727e1a701975d0e72078e844c25f499c Subproject commit 8ff526a316f9b576e727b8e32cba0a53cdec07a6

View file

@ -669,6 +669,9 @@ gst_faad_event (GstPad * pad, GstEvent * event)
GST_STREAM_UNLOCK (pad); GST_STREAM_UNLOCK (pad);
break; break;
} }
case GST_EVENT_FLUSH_START:
res = gst_pad_push_event (faad->srcpad, event);
break;
default: default:
GST_STREAM_LOCK (pad); GST_STREAM_LOCK (pad);
res = gst_pad_push_event (faad->srcpad, event); 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); r = gst_pad_alloc_buffer (faad->srcpad, 0, bufsize, caps, &outbuf);
if (r != GST_FLOW_OK) { if (r != GST_FLOW_OK) {
GST_DEBUG ("Failed to allocate buffer"); 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; goto out;
} }
@ -855,7 +858,9 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
GST_DEBUG ("pushing buffer, off=%" G_GUINT64_FORMAT ", ts=%" GST_DEBUG ("pushing buffer, off=%" G_GUINT64_FORMAT ", ts=%"
GST_TIME_FORMAT, GST_BUFFER_OFFSET (outbuf), GST_TIME_FORMAT, GST_BUFFER_OFFSET (outbuf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (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;
} }
} }
} }

View file

@ -507,6 +507,7 @@ gst_qtdemux_loop_header (GstPad * pad)
int offset; int offset;
guint64 cur_offset; guint64 cur_offset;
int size; int size;
GstFlowReturn ret;
/* FIXME _tell gets the offset wrong */ /* FIXME _tell gets the offset wrong */
//cur_offset = gst_bytestream_tell(qtdemux->bs); //cur_offset = gst_bytestream_tell(qtdemux->bs);
@ -683,7 +684,9 @@ gst_qtdemux_loop_header (GstPad * pad)
GST_DEBUG ("Pushing buf with time=%" GST_TIME_FORMAT, GST_DEBUG ("Pushing buf with time=%" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
gst_buffer_set_caps (buf, stream->caps); gst_buffer_set_caps (buf, stream->caps);
gst_pad_push (stream->pad, buf); ret = gst_pad_push (stream->pad, buf);
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
goto pause;
GST_INFO ("pushing buffer on %" GST_PTR_FORMAT, stream->pad); GST_INFO ("pushing buffer on %" GST_PTR_FORMAT, stream->pad);
} }