gst_rmdemux_free_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
{
  g_object_unref (stream->adapter);
  gst_rmdemux_stream_clear_cached_subpackets (rmdemux, stream);
  if (stream->pending_tags)
    gst_tag_list_unref (stream->pending_tags);
  if (stream->subpackets)
    g_ptr_array_free (stream->subpackets, TRUE);
  g_free (stream->index);
  g_free (stream);
}
gst_rmdemux_free_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
{
  g_object_unref (stream->adapter);
  gst_rmdemux_stream_clear_cached_subpackets (rmdemux, stream);
  if (stream->pending_tags)
    gst_tag_list_unref (stream->pending_tags);
  if (stream->subpackets)
    g_ptr_array_free (stream->subpackets, TRUE);
  g_free (stream->index);
  g_free (stream);
}