mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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.
This commit is contained in:
parent
98d290b864
commit
7eb9e37532
2 changed files with 19 additions and 17 deletions
|
@ -1,3 +1,10 @@
|
|||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue