gst/realmedia/rmdemux.c: One source pad not being linked is not an error condition when we're still parsing the heade...

Original commit message from CVS:
* gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream):
One source pad not being linked is not an error condition when we're
still parsing the header. In this case (e.g. where we don't have a
suitable decoder installed) just pretend everything is fine, so that
the demuxer will actually go on to signal no-more-pads when done
parsing the header, otherwise  decodebin/playbin will never post the
appropriate error message if decoders are not available.
This commit is contained in:
Tim-Philipp Müller 2006-02-04 15:22:02 +00:00
parent a82a14f75d
commit d7075170d8
2 changed files with 22 additions and 13 deletions

View file

@ -1,3 +1,13 @@
2006-02-04 Tim-Philipp Müller <tim at centricular dot net>
* gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream):
One source pad not being linked is not an error condition when we're
still parsing the header. In this case (e.g. where we don't have a
suitable decoder installed) just pretend everything is fine, so that
the demuxer will actually go on to signal no-more-pads when done
parsing the header, otherwise decodebin/playbin will never post the
appropriate error message if decoders are not available.
2006-02-03 Edgard Lima <edgard.lima@indt.org.br>
* ext/mad/gstid3tag.c:

View file

@ -1368,21 +1368,20 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
if (stream->extra_data_size > 0) {
GstBuffer *buffer;
if ((ret = gst_pad_alloc_buffer_and_set_caps
(stream->pad, GST_BUFFER_OFFSET_NONE, stream->extra_data_size,
stream->caps, &buffer))
!= GST_FLOW_OK) {
GST_WARNING_OBJECT (rmdemux, "failed to alloc extra_data src "
"buffer for stream %d", stream->id);
goto beach;
}
if ((ret = gst_pad_alloc_buffer_and_set_caps (stream->pad,
GST_BUFFER_OFFSET_NONE, stream->extra_data_size,
stream->caps, &buffer)) == GST_FLOW_OK) {
memcpy (GST_BUFFER_DATA (buffer), stream->extra_data,
stream->extra_data_size);
GST_DEBUG_OBJECT (rmdemux, "Pushing extra_data of size %d to pad",
stream->extra_data_size);
GST_DEBUG_OBJECT (rmdemux, "Pushing extra_data of size %d to pad %s",
stream->extra_data_size, GST_PAD_NAME (stream->pad));
ret = gst_pad_push (stream->pad, buffer);
} else {
GST_WARNING_OBJECT (rmdemux, "failed to alloc extra_data src "
"buffer for stream %d (%s)", stream->id, gst_flow_get_name (ret));
ret = GST_FLOW_OK; /* one unlinked pad doesn't mean an error */
}
}
}