mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
gst/audiorate/gstaudiorate.c: Properly return GstFlowReturn from gst_pad_push in chain functions.
Original commit message from CVS: * gst/audiorate/gstaudiorate.c: (gst_audiorate_chain): Properly return GstFlowReturn from gst_pad_push in chain functions.
This commit is contained in:
parent
d263be8f79
commit
b8206860b0
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-26 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* gst/audiorate/gstaudiorate.c: (gst_audiorate_chain):
|
||||||
|
Properly return GstFlowReturn from gst_pad_push in chain functions.
|
||||||
|
|
||||||
2005-11-25 Michael Smith <msmith@fluendo.com>
|
2005-11-25 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_query_convert),
|
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_query_convert),
|
||||||
|
|
|
@ -247,6 +247,7 @@ gst_audiorate_chain (GstPad * pad, GstBuffer * buf)
|
||||||
GstClockTime in_time, in_duration;
|
GstClockTime in_time, in_duration;
|
||||||
guint64 in_offset, in_offset_end;
|
guint64 in_offset, in_offset_end;
|
||||||
gint in_size;
|
gint in_size;
|
||||||
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
|
|
||||||
audiorate = GST_AUDIORATE (gst_pad_get_parent (pad));
|
audiorate = GST_AUDIORATE (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
|
@ -281,7 +282,8 @@ gst_audiorate_chain (GstPad * pad, GstBuffer * buf)
|
||||||
GST_BUFFER_OFFSET (fill) = audiorate->next_offset;
|
GST_BUFFER_OFFSET (fill) = audiorate->next_offset;
|
||||||
GST_BUFFER_OFFSET_END (fill) = in_offset;
|
GST_BUFFER_OFFSET_END (fill) = in_offset;
|
||||||
|
|
||||||
gst_pad_push (audiorate->srcpad, fill);
|
if ((ret = gst_pad_push (audiorate->srcpad, fill) != GST_FLOW_OK))
|
||||||
|
goto beach;
|
||||||
audiorate->out++;
|
audiorate->out++;
|
||||||
audiorate->add += fillsamples;
|
audiorate->add += fillsamples;
|
||||||
|
|
||||||
|
@ -302,7 +304,7 @@ gst_audiorate_chain (GstPad * pad, GstBuffer * buf)
|
||||||
if (!audiorate->silent)
|
if (!audiorate->silent)
|
||||||
g_object_notify (G_OBJECT (audiorate), "drop");
|
g_object_notify (G_OBJECT (audiorate), "drop");
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
goto beach;
|
||||||
} else {
|
} else {
|
||||||
guint64 truncsamples, truncsize, leftsize;
|
guint64 truncsamples, truncsize, leftsize;
|
||||||
GstBuffer *trunc;
|
GstBuffer *trunc;
|
||||||
|
@ -327,11 +329,12 @@ gst_audiorate_chain (GstPad * pad, GstBuffer * buf)
|
||||||
audiorate->drop += truncsamples;
|
audiorate->drop += truncsamples;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_pad_push (audiorate->srcpad, buf);
|
ret = gst_pad_push (audiorate->srcpad, buf);
|
||||||
audiorate->out++;
|
audiorate->out++;
|
||||||
|
|
||||||
audiorate->next_offset = in_offset_end;
|
audiorate->next_offset = in_offset_end;
|
||||||
return GST_FLOW_OK;
|
beach:
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue