Commit 7eb9e375 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

gst/matroska/matroska-demux.c: Don't error out when the source pad isn't linked.

Original commit message from CVS:
* gst/matroska/matroska-demux.c:
(gst_matroska_demux_push_vorbis_codec_priv_data),
(gst_matroska_demux_add_wvpk_header):
Don't error out when the source pad isn't linked.
parent 98d290b8
2005-11-07 Tim-Philipp Müller <tim at centricular dot net>
* gst/matroska/matroska-demux.c:
(gst_matroska_demux_push_vorbis_codec_priv_data),
(gst_matroska_demux_add_wvpk_header):
Don't error out when the source pad isn't linked.
2005-11-02 Tim-Philipp Müller <tim at centricular dot net>
* ext/gconf/gstgconfaudiosink.c: (do_toggle_element),
......
......@@ -2008,28 +2008,23 @@ gst_matroska_demux_push_vorbis_codec_priv_data (GstMatroskaDemux * demux,
for (i = 0; i < 2; i++) {
length = p[i + 1];
if (gst_pad_alloc_buffer (stream->pad, GST_BUFFER_OFFSET_NONE,
length, stream->caps, &priv) != GST_FLOW_OK) {
return FALSE;
}
memcpy (GST_BUFFER_DATA (priv), &p[offset], length);
ret = gst_pad_push (stream->pad, priv);
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
return FALSE;
length, stream->caps, &priv) == GST_FLOW_OK) {
memcpy (GST_BUFFER_DATA (priv), &p[offset], length);
ret = gst_pad_push (stream->pad, priv);
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
return FALSE;
}
offset += length;
}
length = stream->codec_priv_size - offset;
if (gst_pad_alloc_buffer (stream->pad, GST_BUFFER_OFFSET_NONE, length,
stream->caps, &priv) != GST_FLOW_OK) {
return FALSE;
stream->caps, &priv) == GST_FLOW_OK) {
memcpy (GST_BUFFER_DATA (priv), &p[offset], length);
ret = gst_pad_push (stream->pad, priv);
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
return FALSE;
}
memcpy (GST_BUFFER_DATA (priv), &p[offset], length);
ret = gst_pad_push (stream->pad, priv);
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
return FALSE;
return TRUE;
}
......@@ -2072,7 +2067,7 @@ gst_matroska_demux_add_wvpk_header (GstMatroskaTrackContext * stream,
newlen = block_length + sizeof (Wavpack4Header) - 12;
if (gst_pad_alloc_buffer (stream->pad, GST_BUFFER_OFFSET_NONE, newlen,
stream->caps, &newbuf) != GST_FLOW_OK) {
return FALSE;
return TRUE; /* not an error, pad might not be linked */
}
data = GST_BUFFER_DATA (newbuf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment